stuff
This commit is contained in:
@@ -11,6 +11,10 @@ uniform vec2 pixelScale;
|
||||
uniform float z;
|
||||
uniform float rotation;
|
||||
|
||||
uniform int uvMode = 0; // 0 = stretch, 1 = tile
|
||||
uniform vec3 tileScale = vec3(1.0);
|
||||
uniform vec2 uvOffset = vec2(0.0);
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 unitPos = aPos * 0.5 + 0.5;
|
||||
@@ -20,5 +24,7 @@ void main()
|
||||
|
||||
gl_Position = vec4(ndc, 0.0f, 1.0f);
|
||||
|
||||
TexCoords = aTexCoords;
|
||||
// Screen y runs down here, so flip v to keep images the right way up
|
||||
vec2 uv = vec2(aTexCoords.x, 1.0 - aTexCoords.y);
|
||||
TexCoords = (uvMode == 1 ? uv * tileScale.xy : uv) + uvOffset;
|
||||
}
|
||||
Reference in New Issue
Block a user