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 |
---|
2 | precision mediump int; |
---|
3 | precision mediump float; |
---|
4 | |
---|
5 | uniform sampler2D inRTT; |
---|
6 | |
---|
7 | uniform vec4 sampleOffsets[15]; |
---|
8 | uniform vec4 sampleWeights[15]; |
---|
9 | |
---|
10 | varying vec2 uv; |
---|
11 | |
---|
12 | void 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.