Last change
on this file since 12373 was
12115,
checked in by wiesep, 6 years ago
|
Changed folder structure, deletet some unused files and cleaned up code
|
File size:
860 bytes
|
Rev | Line | |
---|
[12115] | 1 | #version 150 |
---|
| 2 | |
---|
| 3 | uniform sampler2D inRTT; |
---|
| 4 | uniform vec2 texelSize; |
---|
| 5 | |
---|
| 6 | in vec2 oUv0; |
---|
| 7 | out vec4 fragColour; |
---|
| 8 | |
---|
| 9 | void main(void) |
---|
| 10 | { |
---|
| 11 | vec4 accum = vec4(0.0); |
---|
| 12 | |
---|
| 13 | // Get colour from source |
---|
| 14 | accum += texture(inRTT, oUv0 + texelSize * vec2(-1.0, -1.0)); |
---|
| 15 | accum += texture(inRTT, oUv0 + texelSize * vec2( 0.0, -1.0)); |
---|
| 16 | accum += texture(inRTT, oUv0 + texelSize * vec2( 1.0, -1.0)); |
---|
| 17 | accum += texture(inRTT, oUv0 + texelSize * vec2(-1.0, 0.0)); |
---|
| 18 | accum += texture(inRTT, oUv0 + texelSize * vec2( 0.0, 0.0)); |
---|
| 19 | accum += texture(inRTT, oUv0 + texelSize * vec2( 1.0, 0.0)); |
---|
| 20 | accum += texture(inRTT, oUv0 + texelSize * vec2(-1.0, 1.0)); |
---|
| 21 | accum += texture(inRTT, oUv0 + texelSize * vec2( 0.0, 1.0)); |
---|
| 22 | accum += texture(inRTT, oUv0 + texelSize * vec2( 1.0, 1.0)); |
---|
| 23 | |
---|
| 24 | // take average of 9 samples |
---|
| 25 | accum *= 0.1111111111111111; |
---|
| 26 | |
---|
| 27 | fragColour = accum; |
---|
| 28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.