20 lines
504 B
GLSL
20 lines
504 B
GLSL
uniform mat4 mvpMatrix;
|
|
uniform mat4 transformationMatrix;
|
|
uniform vec2 texCoordScaling;
|
|
|
|
attribute vec4 position;
|
|
attribute vec2 texCoords;
|
|
|
|
varying vec2 pass_TexCoords;
|
|
|
|
void main() {
|
|
|
|
vec4 transformatedPosition = transformationMatrix * position;
|
|
gl_Position = mvpMatrix * transformatedPosition;
|
|
pass_TexCoords = texCoords;
|
|
if(texCoordScaling.x != 0.0)
|
|
pass_TexCoords.x *= texCoordScaling.x;
|
|
if(texCoordScaling.y != 0.0)
|
|
pass_TexCoords.y *= texCoordScaling.y;
|
|
|
|
} |