Improved MSDF generation and rendering

This commit is contained in:
Simon Lübeß
2021-09-20 15:42:10 +02:00
parent 2afff4ec20
commit 3f1f5736b5
6 changed files with 197 additions and 178 deletions
+1 -2
View File
@@ -42,8 +42,7 @@ float4 PS(PS_Input input) : SV_Target0
float sd = median(msd.r, msd.g, msd.b);
float screenPxDistance = screenPixelRange * (sd - 0.5);
float opacity = clamp(screenPxDistance + 0.5, 0.0, 1.0);
//color = mix(bgColor, fgColor, opacity);
//float4 color = lerp(float4(0, 0, 0, 0), input.Color, opacity);
//float4 color = lerp(float4(1, 0, 0, 1), input.Color, opacity);
//return color;
return float4(input.Color.rgb, opacity * input.Color.a);