repo.or.cz
/
shady.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
infinite terrain experiments
[shady.git]
/
postprocess_fuss.glsl
blob
fb0e79383c10ff820868e0cce812cc7fee1311f6
1
2
@@@ FRAGMENT SHADER
3
4
uniform sampler2D render;
5
6
uniform float radius;
7
uniform float time;
8
uniform float var;
9
uniform float aspect;
10
11
void main() {
12
13
vec2 p = gl_TexCoord[0].st;
14
15
vec4 s = vec4(0, 0, 0, 0);
16
for(int i = 0; i < 20; i++){
17
s += pow(1.8, -2) * texture2D(render, ((1 - 0.01 * var * i) * (p - 0.5)) + 0.5);
18
}
19
20
gl_FragColor = s / 5;
21
}
22