4 * Copyright (C) 2010 - 2015 Leonid Kostrykin
6 * Chair of Medical Engineering (mediTEC)
7 * RWTH Aachen University
14 uniform sampler2D integralMap;
15 uniform float baseIntensity;
16 uniform int renderInverse;
18 in vec2 textureCoordinates;
20 out vec4 gl_FragColor;
23 // ----------------------------------------------------------------------------------
25 // ----------------------------------------------------------------------------------
29 float integral = texture( integralMap, textureCoordinates ).r;
30 float result = clamp( baseIntensity * exp( -integral ), 0, 1 );
32 vec3 color = ( 1 - renderInverse ) * vec3( 1, 1, 1 );
34 gl_FragColor = vec4( color, 1 - result );