[vlc-commits] [Git][videolan/vlc][master] opengl: fix coords mapping in plane filtering

Romain Vimont (@rom1v) gitlab at videolan.org
Fri Aug 27 14:53:42 UTC 2021



Romain Vimont pushed to branch master at VideoLAN / VLC


Commits:
d94968e8 by Romain Vimont at 2021-08-27T14:25:56+00:00
opengl: fix coords mapping in plane filtering

The matrix to bind might be different for each plane.

- - - - -


1 changed file:

- modules/video_output/opengl/sampler.c


Changes:

=====================================
modules/video_output/opengl/sampler.c
=====================================
@@ -800,8 +800,13 @@ sampler_planes_load(const struct vlc_gl_sampler *sampler)
     vt->ActiveTexture(GL_TEXTURE0);
     vt->BindTexture(priv->tex_target, priv->textures[plane]);
 
+    /* Only one TexCoordMap matrix is necessary in the shader (its location is
+     * stored in uloc.TexCoordsMaps[0]), as there is only one plane per
+     * execution. However, for a single picture, there are several coords
+     * mapping matrices (one per plane), so the correct one
+     * (var.TexCoordsMaps[plane]) must be bound. */
     vt->UniformMatrix3fv(priv->uloc.TexCoordsMaps[0], 1, GL_FALSE,
-                         priv->var.TexCoordsMaps[0]);
+                         priv->var.TexCoordsMaps[plane]);
 
     /* Return the expected transform matrix if interop == NULL */
     const GLfloat *tm = GetTransformMatrix(priv->interop);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d94968e8a5806f094ac573ecab030381dc09e9a9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d94968e8a5806f094ac573ecab030381dc09e9a9
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list