Commit 4dca984a by huangdarwin Committed by Oliver Woodman

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
parent 8c90ba5d
...@@ -17,6 +17,6 @@ uniform mat4 tex_transform; ...@@ -17,6 +17,6 @@ uniform mat4 tex_transform;
uniform mat4 transformation_matrix; uniform mat4 transformation_matrix;
varying vec2 v_texcoord; varying vec2 v_texcoord;
void main() { void main() {
gl_Position = a_position; gl_Position = transformation_matrix * a_position;
v_texcoord = (transformation_matrix * tex_transform * a_texcoord).xy; v_texcoord = (tex_transform * a_texcoord).xy;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment