smrendererv3/SMCode/SM.Base/Shader/Files/default.vert
Michel Fedde c4a0847567 20.09.2020
+ Instance Drawing
+ Text and Font

~ Made "DrawBackground" forced Background for 2D

- DrawEmpty
2020-09-20 18:29:09 +02:00

17 lines
No EOL
436 B
GLSL

#version 330
#define maxInstances 32
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec2 aTex;
uniform mat4 MVP;
uniform mat4 ModelMatrix[maxInstances];
uniform vec2 TextureOffset[maxInstances];
uniform vec2 TextureScale[maxInstances];
out vec2 vTexture;
void main() {
vTexture = aTex * TextureScale[gl_InstanceID] + TextureOffset[gl_InstanceID];
gl_Position = MVP * ModelMatrix[gl_InstanceID] * vec4(aPos, 1);
}