Fixed circle instancing buffer + clip pixels

This commit is contained in:
Simon Lübeß
2021-10-15 12:57:32 +02:00
parent dcb8424c2d
commit adaf62de62
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -50,6 +50,9 @@ float4 PS(PS_Input input) : SV_Target0
float amount = smoothstep(0.0f, f, distance);
amount *= smoothstep(input.InnerRadius + f, input.InnerRadius, distance);
// Discard invisible pixels
clip(amount - 0.5f);
float4 color = Texture.Sample(Sampler, input.Texcoord) * input.Color;
color.a *= amount;