mirror of
https://github.com/IllusionMan1212/cudoku.git
synced 2026-10-24 02:12:25 +00:00
super basic UI constraint and alignment system with a super basic "game framework"
This commit is contained in:
@@ -3,9 +3,9 @@ in vec2 TexCoords;
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform sampler2D text;
|
||||
uniform vec3 textColor;
|
||||
uniform vec4 textColor;
|
||||
|
||||
void main() {
|
||||
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, TexCoords).r);
|
||||
FragColor = vec4(textColor, 1.0) * sampled;
|
||||
FragColor = textColor * sampled;
|
||||
}
|
||||
@@ -2,9 +2,10 @@
|
||||
layout (location = 0) in vec4 vertex;
|
||||
|
||||
out vec2 TexCoords;
|
||||
uniform mat4 transform;
|
||||
uniform mat4 projection;
|
||||
uniform mat4 model;
|
||||
|
||||
void main() {
|
||||
gl_Position = transform * vec4(vertex.xy, 0.0, 1.0);
|
||||
gl_Position = projection * model * vec4(vertex.xy, 0.0, 1.0);
|
||||
TexCoords = vertex.zw;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#version 330 core
|
||||
|
||||
in vec2 texCoords;
|
||||
out vec4 FragColor;
|
||||
uniform vec4 aColor;
|
||||
|
||||
void main() {
|
||||
FragColor = vec4(aColor);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec2 aTexCoords;
|
||||
out vec2 texCoords;
|
||||
|
||||
uniform mat4 projection;
|
||||
|
||||
void main() {
|
||||
gl_Position = projection * vec4(aPos, 1.0f);
|
||||
texCoords = aTexCoords;
|
||||
}
|
||||
Reference in New Issue
Block a user