From 7c0ca92da0d2d0fd7e7f4da957ef7d1ea9f15e41 Mon Sep 17 00:00:00 2001 From: talha Date: Tue, 8 Oct 2024 21:15:38 +0500 Subject: Saving draft, added collision detection so far --- source/shaders/ui_text.vs.glsl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 source/shaders/ui_text.vs.glsl (limited to 'source/shaders/ui_text.vs.glsl') 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; +} -- cgit v1.2.3