niri
Clone
https://git.tahinli.com/Tahinli/niri.git
0 watching0 forksRustGPL-3.012.1 MiB9d8f4f8Ivan Molodetskikh1 month ago2997 commits
| 1 | #version 100 |
| 2 | |
| 3 | precision highp float; |
| 4 | |
| 5 | varying vec2 v_coords; |
| 6 | |
| 7 | uniform sampler2D tex; |
| 8 | uniform vec2 half_pixel; |
| 9 | uniform float offset; |
| 10 | |
| 11 | void main() { |
| 12 | vec2 o = half_pixel * offset; |
| 13 | |
| 14 | vec4 sum = texture2D(tex, v_coords) * 4.0; |
| 15 | sum += texture2D(tex, v_coords + vec2(-o.x, -o.y)); |
| 16 | sum += texture2D(tex, v_coords + vec2( o.x, -o.y)); |
| 17 | sum += texture2D(tex, v_coords + vec2(-o.x, o.y)); |
| 18 | sum += texture2D(tex, v_coords + vec2( o.x, o.y)); |
| 19 | |
| 20 | gl_FragColor = sum / 8.0; |
| 21 | } |