From 2bf094cd55a5526dbdf7cab8d5a4bd3fb867c084 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 3 Aug 2017 18:51:51 +0200 Subject: vo_opengl: don't hardcode texmap0 for polar compute This was an oversight. The ID shouldn't be hard-coded here, so add it to sampler_prelude instead. --- video/out/opengl/video_shaders.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video/out/opengl/video_shaders.c b/video/out/opengl/video_shaders.c index 9c836a09d0..a7b253249a 100644 --- a/video/out/opengl/video_shaders.c +++ b/video/out/opengl/video_shaders.c @@ -29,7 +29,9 @@ void sampler_prelude(struct gl_shader_cache *sc, int tex_num) { GLSLF("#undef tex\n"); + GLSLF("#undef texmap\n"); GLSLF("#define tex texture%d\n", tex_num); + GLSLF("#define texmap texmap%d\n", tex_num); GLSLF("vec2 pos = texcoord%d;\n", tex_num); GLSLF("vec2 size = texture_size%d;\n", tex_num); GLSLF("vec2 pt = pixel_size%d;\n", tex_num); @@ -227,7 +229,7 @@ void pass_compute_polar(struct gl_shader_cache *sc, struct scaler *scaler, GLSL(color = vec4(0.0);) GLSLF("{\n"); - GLSL(vec2 wpos = texmap0(gl_WorkGroupID * gl_WorkGroupSize);) + GLSL(vec2 wpos = texmap(gl_WorkGroupID * gl_WorkGroupSize);) GLSL(vec2 wbase = wpos - pt * fract(wpos * size - vec2(0.5));) GLSL(vec2 fcoord = fract(pos * size - vec2(0.5));) GLSL(vec2 base = pos - pt * fcoord;) -- cgit v1.2.3