mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:10:05 +00:00
17 lines
317 B
GLSL
17 lines
317 B
GLSL
#version 330 core
|
|
|
|
in vec2 texCoords;
|
|
in vec4 textColor;
|
|
|
|
out vec4 color;
|
|
|
|
uniform sampler2D uTexture;
|
|
|
|
void main()
|
|
{
|
|
float dist = texture(uTexture, texCoords).r;
|
|
float width = fwidth(dist);
|
|
float alpha = smoothstep(0.5f - width, 0.5f + width, dist);
|
|
|
|
color = vec4(textColor.rgb, textColor.a * alpha);
|
|
}
|