mirror of
https://github.com/IllusionMan1212/cudoku.git
synced 2026-10-24 02:12:25 +00:00
help overlay
This commit is contained in:
+1
-1
@@ -1,9 +1,9 @@
|
||||
#version 330 core
|
||||
in vec2 v_TexCoords;
|
||||
in vec4 textColor;
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform sampler2D text;
|
||||
uniform vec4 textColor;
|
||||
|
||||
const float smoothness = 0.05;
|
||||
const float outlineDistance = 0.50;
|
||||
|
||||
+4
-1
@@ -4,9 +4,11 @@ layout (location = 0) in vec2 vertex;
|
||||
// per instance
|
||||
layout (location = 1) in vec4 offset;
|
||||
layout (location = 2) in int tex_index;
|
||||
layout (location = 3) in mat4 model; // this takes locations 3,4,5,6
|
||||
layout (location = 3) in vec4 color;
|
||||
layout (location = 4) in mat4 model; // this takes locations 4,5,6,7
|
||||
|
||||
out vec2 v_TexCoords;
|
||||
out vec4 textColor;
|
||||
uniform mat4 projection;
|
||||
// buffer for all the 96 ascii characters' texcoords
|
||||
uniform vec2 texcoords[96 * 4];
|
||||
@@ -15,4 +17,5 @@ void main() {
|
||||
vec2 pos = vec2((vertex.x) * offset.z, (vertex.y) * offset.w);
|
||||
gl_Position = projection * model * vec4(pos + offset.xy, 0.0, 1.0);
|
||||
v_TexCoords = texcoords[tex_index * 4 + gl_VertexID];
|
||||
textColor = color;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user