mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Transformer GL: Apply transformation_matrix to vertex position.
Previously, transformation_matrix was incorrectly applied to texture sampling coordinates, which led to transformations seemingly moving in the opposite position, and an undesirable GL_CLAMP_TO_EDGE behavior when sampling outside the edge of the texture. PiperOrigin-RevId: 413653360
This commit is contained in:
parent
8c90ba5db4
commit
4dca984aa5
1 changed files with 2 additions and 2 deletions
|
|
@ -17,6 +17,6 @@ uniform mat4 tex_transform;
|
|||
uniform mat4 transformation_matrix;
|
||||
varying vec2 v_texcoord;
|
||||
void main() {
|
||||
gl_Position = a_position;
|
||||
v_texcoord = (transformation_matrix * tex_transform * a_texcoord).xy;
|
||||
gl_Position = transformation_matrix * a_position;
|
||||
v_texcoord = (tex_transform * a_texcoord).xy;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue