basic game logic with simple translation animation

This commit is contained in:
2023-12-13 06:58:08 +02:00
parent 7360359a48
commit 9620e12681
44 changed files with 33798 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
#version 330 core
in vec2 v_TexCoords;
in vec4 textColor;
out vec4 FragColor;
uniform sampler2D text;
const float smoothness = 0.05;
const float outlineDistance = 0.50;
const vec4 outlineColor = vec4(0.0, 0.0, 0.0, 1.0);
void main() {
//float distance = texture(text, v_TexCoords).r;
//float outlineFactor = smoothstep(0.5 - smoothness, 0.5 + smoothness, distance);
//vec4 color = mix(outlineColor, textColor, outlineFactor);
//float alpha = smoothstep(outlineDistance - smoothness, outlineDistance + smoothness, distance);
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, v_TexCoords).r);
FragColor = textColor * sampled;
//FragColor = vec4(color.rgb, textColor.a * alpha);
}