<-vertex-> #version 120 varying vec2 uv; void main(void) { uv = gl_MultiTexCoord0.st; gl_Position = ftransform(); } <-fragment-> uniform sampler2D sceneTex; // 0 varying vec2 uv; void main () { vec4 c = texture2D(sceneTex, uv); c += texture2D(sceneTex, uv+0.001); c += texture2D(sceneTex, uv+0.003); c += texture2D(sceneTex, uv+0.005); c += texture2D(sceneTex, uv+0.007); c += texture2D(sceneTex, uv+0.009); c += texture2D(sceneTex, uv+0.011); c += texture2D(sceneTex, uv-0.001); c += texture2D(sceneTex, uv-0.003); c += texture2D(sceneTex, uv-0.005); c += texture2D(sceneTex, uv-0.007); c += texture2D(sceneTex, uv-0.009); c += texture2D(sceneTex, uv-0.011); c.rgb = vec3((c.r+c.g+c.b)/3.0); c = c / 9.5; gl_FragColor = c; }
时间: 2024-11-07 17:44:36