16 lines
344 B
Plaintext
16 lines
344 B
Plaintext
#include "fgui_text_shared.slang"
|
|
|
|
[shader("fragment")]
|
|
float4 _main(
|
|
VertexOutput input,
|
|
uint triid: SV_PrimitiveID,
|
|
) : SV_TARGET
|
|
{
|
|
float dist = SampleTexture(font, (input.uv+glyphPos)*glyphSize).x;
|
|
float smoothing = 0.2;
|
|
float alpha = smoothstep(0.5-smoothing, 0.5+smoothing, dist);
|
|
if (alpha<0.01) discard;
|
|
return float4(color);
|
|
}
|
|
|