mirror of
https://github.com/IllusionMan1212/C2048.git
synced 2026-10-24 02:12:31 +00:00
basic game logic with simple translation animation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user