¡@

Home 

2014/10/15 ¤U¤È 10:09:21

iphone Programming Glossary: fragtexcoord.y

OpenGL ES 2.0 fragment shader to blur is slow and low quality

http://stackoverflow.com/questions/4355525/opengl-es-2-0-fragment-shader-to-blur-is-slow-and-low-quality

highp vec4 color vec4 0 0 0 1 for int i 0 i 7 i color texture2D texture vec2 fragTexCoord.x gaussFilter i .x blurSize fragTexCoord.y gaussFilter i .x blurSize gaussFilter i .y gl_FragColor color Edit A box blur may be the way to go. Here is a box blur version.. go. Here is a box blur version of the shader highp vec4 color vec4 0 0 0 1 color texture2D texture vec2 fragTexCoord.x fragTexCoord.y 4.0 blurAmount 0.05 color texture2D texture vec2 fragTexCoord.x fragTexCoord.y 3.0 blurAmount 0.09 color texture2D texture.. texture2D texture vec2 fragTexCoord.x fragTexCoord.y 4.0 blurAmount 0.05 color texture2D texture vec2 fragTexCoord.x fragTexCoord.y 3.0 blurAmount 0.09 color texture2D texture vec2 fragTexCoord.x fragTexCoord.y 2.0 blurAmount 0.12 color texture2D texture..