mirror of
https://github.com/IllusionMan1212/cudoku.git
synced 2026-10-24 02:12:25 +00:00
implemented unicode support and generation of font atlas texture
This commit is contained in:
@@ -5,7 +5,17 @@ out vec4 FragColor;
|
||||
uniform sampler2D text;
|
||||
uniform vec4 textColor;
|
||||
|
||||
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