Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/Example/GLSLES/hdr_bloom.glsles @ 12091

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

Updated programs and adjusted Material to work with GLSL>150

File size: 505 bytes
Line 
1#version 100
2precision mediump int;
3precision mediump float;
4
5uniform sampler2D inRTT;
6
7uniform vec4 sampleOffsets[15];
8uniform vec4 sampleWeights[15];
9
10varying vec2 uv;
11
12void main(void)
13{
14    vec4 accum = vec4(0.0, 0.0, 0.0, 1.0);
15        vec2 sampleUV;
16   
17    for( int i = 0; i < 15; i++ )
18    {
19        // Sample from adjacent points, 7 each side and central
20        sampleUV = uv + sampleOffsets[i].xy;
21        accum += sampleWeights[i] * texture2D(inRTT, sampleUV);
22    }
23   
24    gl_FragColor = accum;
25}
Note: See TracBrowser for help on using the repository browser.