Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/GLSL/hdr_finalToneMapping.glsl @ 12408

Last change on this file since 12408 was 12115, checked in by wiesep, 6 years ago

Changed folder structure, deletet some unused files and cleaned up code

File size: 559 bytes
Line 
1uniform sampler2D inRTT;
2uniform sampler2D inBloom;
3uniform sampler2D inLum;
4
5varying vec2 uv;
6
7// declare external function
8vec4 toneMap(in vec4 inColour, in float lum);
9
10void main(void)
11{
12        // Get main scene colour
13    vec4 sceneCol = texture2D(inRTT, uv);
14
15        // Get luminence value
16        vec4 lum = texture2D(inLum, vec2(0.5, 0.5));
17
18        // tone map this
19        vec4 toneMappedSceneCol = toneMap(sceneCol, lum.r);
20       
21        // Get bloom colour
22    vec4 bloom = texture2D(inBloom, uv);
23
24        // Add scene & bloom
25        gl_FragColor = vec4(toneMappedSceneCol.rgb + bloom.rgb, 1.0);
26   
27}
28
Note: See TracBrowser for help on using the repository browser.