Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/GLSL150/hdr_bloom.glsl @ 12202

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

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

File size: 465 bytes
RevLine 
[12115]1#version 150
2
3uniform sampler2D inRTT;
4
5uniform vec4 sampleOffsets[15];
6uniform vec4 sampleWeights[15];
7
8in vec2 oUv0;
9out vec4 fragColour;
10
11void main(void)
12{
13    vec4 accum = vec4(0.0, 0.0, 0.0, 1.0);
14        vec2 sampleUV;
15
16    for( int i = 0; i < 15; i++ )
17    {
18        // Sample from adjacent points, 7 each side and central
19        sampleUV = oUv0 + sampleOffsets[i].xy;
20        accum += sampleWeights[i] * texture(inRTT, sampleUV);
21    }
22
23    fragColour = accum;
24}
Note: See TracBrowser for help on using the repository browser.