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:
huangdarwin 2021-12-02 13:45:30 +00:00 committed by Oliver Woodman
parent 8c90ba5db4
commit 4dca984aa5

View File

@ -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;
}