diff options
author | talha <sarcxd@gmail.com> | 2024-10-08 21:15:38 +0500 |
---|---|---|
committer | talha <sarcxd@gmail.com> | 2024-10-08 21:15:38 +0500 |
commit | 7c0ca92da0d2d0fd7e7f4da957ef7d1ea9f15e41 (patch) | |
tree | c5db10f770781a2a7bff76ef9330de4779416eb6 /source/shaders/ui_text.vs.glsl |
Saving draft, added collision detection so far
Diffstat (limited to 'source/shaders/ui_text.vs.glsl')
-rwxr-xr-x | source/shaders/ui_text.vs.glsl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/shaders/ui_text.vs.glsl b/source/shaders/ui_text.vs.glsl new file mode 100755 index 0000000..9bba904 --- /dev/null +++ b/source/shaders/ui_text.vs.glsl @@ -0,0 +1,16 @@ +#version 330 core +layout(location=0) in vec2 aPos; + +uniform mat4 Projection; +uniform mat4 View; +uniform mat4 LetterTransforms[32]; +out vec2 TexCoords; +flat out int Index; + +void main() { + gl_Position = Projection * View * LetterTransforms[gl_InstanceID] * vec4(aPos, 0.0, 1.0); + vec2 tex = aPos; + TexCoords = tex; + TexCoords.y = 1.0 - TexCoords.y; + Index = gl_InstanceID; +} |