Hi Erik. I'm the author of Pyshaders. The shader you are trying to compile is not supported because it is too old ( < GLSL 1.2 / opengl 2.1 ).
I can tell because varying/attributes are not used anymore. If you are looking for a gaussian blur shader here is one that I have taken from https://github.com/Jam3/glsl-fast-gaussian-blur I haven't tested it beyond compiling because I don't have the time, but it should do the trick. If you have more problems you can contact me at gdube.475 at gmail.com or you can open an issue on github if you are think you found a bug. frag = """ #version 130 precision highp float; uniform vec3 iResolution; uniform sampler2D iChannel0; uniform bool flip; uniform vec2 direction; vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) { vec4 color = vec4(0.0); vec2 off1 = vec2(1.3846153846) * direction; vec2 off2 = vec2(3.2307692308) * direction; color += texture2D(image, uv) * 0.2270270270; color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162; color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162; color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703; color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703; return color; } vec4 blur5(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) { vec4 color = vec4(0.0); vec2 off1 = vec2(1.3333333333333333) * direction; color += texture2D(image, uv) * 0.29411764705882354; color += texture2D(image, uv + (off1 / resolution)) * 0.35294117647058826; color += texture2D(image, uv - (off1 / resolution)) * 0.35294117647058826; return color; } vec4 blur13(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) { vec4 color = vec4(0.0); vec2 off1 = vec2(1.411764705882353) * direction; vec2 off2 = vec2(3.2941176470588234) * direction; vec2 off3 = vec2(5.176470588235294) * direction; color += texture2D(image, uv) * 0.1964825501511404; color += texture2D(image, uv + (off1 / resolution)) * 0.2969069646728344; color += texture2D(image, uv - (off1 / resolution)) * 0.2969069646728344; color += texture2D(image, uv + (off2 / resolution)) * 0.09447039785044732; color += texture2D(image, uv - (off2 / resolution)) * 0.09447039785044732; color += texture2D(image, uv + (off3 / resolution)) * 0.010381362401148057; color += texture2D(image, uv - (off3 / resolution)) * 0.010381362401148057; return color; } void main() { vec2 uv = vec2(gl_FragCoord.xy / iResolution.xy); if (flip) { uv.y = 1.0 - uv.y; } gl_FragColor = blur13(iChannel0, uv, iResolution.xy, direction); } """ vert = """ #version 130 precision mediump float; attribute vec2 position; void main() { gl_Position = vec4(position, 1, 1); } """ -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
