CSE380/hw3/dist/builtin/shaders/sprite.vshader

13 lines
263 B
Plaintext
Raw Permalink Normal View History

2022-05-23 06:00:37 -04:00
attribute vec4 a_Position;
attribute vec2 a_TexCoord;
uniform mat4 u_Transform;
uniform vec2 u_texShift;
uniform vec2 u_texScale;
varying vec2 v_TexCoord;
void main(){
gl_Position = u_Transform * a_Position;
v_TexCoord = a_TexCoord*u_texScale + u_texShift;
}