Hi, I am trying to make it work on my machine.
modified Unknown6656/CVGL/pixel_shader.py
@@ -52,11 +52,11 @@ class PixelShader:
vec4 blur(const vec2 coords, const float r, const float q)
{{
float i_qual = 1.0 / q;
- vec4 color = texture2D(image, coords);
+ vec4 color = texture(image, coords);
for (float phi = 0.0; phi < TAU; phi += TAU * i_qual * i_qual)
for (float i = i_qual; i <= 1.0; i += i_qual)
- color += texture2D(image, coords + vec2(cos(phi) / width, sin(phi) / height) * r * i);
+ color += texture(image, coords + vec2(cos(phi) / width, sin(phi) / height) * r * i);
return color * i_qual * i_qual * i_qual;
}}
@@ -326,7 +326,8 @@ class PixelShader:
gl.glFramebufferTexture(gl.GL_FRAMEBUFFER, gl.GL_COLOR_ATTACHMENT0, self._texture_out, 0)
gl.glDrawBuffers(1, [gl.GL_COLOR_ATTACHMENT0])
- gl.glBindTextureUnit(np.int32(0), self._texture_in)
+ gl.glActiveTexture(gl.GL_TEXTURE0 + np.int32(0))
+ gl.glBindTexture(gl.GL_TEXTURE_2D, self._texture_in)
gl.glViewport(0, 0, width, height)
gl.glClear(gl.GL_COLOR_BUFFER_BIT)
with this I don't get any error message, but the images look weird. Like the colors are very desaturated and the image is skewed.