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
417c242625
commit
58a8aceb97
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user