Skip to content

Commit 1573f2b

Browse files
committed
Bias alpha test LODs
Higher mip levels don't alpha test well
1 parent d5cc305 commit 1573f2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Environment.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ float4 main(float4 pos : SV_Position, PSInput input COVERAGE_OUT) : SV_TARGET {
139139
coverage = 0;
140140
[unroll]
141141
for (uint bit = 0; bit < MSAA_SAMPLE_COUNT; bit++) {
142-
coverage |= (sStage0.Sample(smpsStage0, EvaluateAttributeAtSample(input.litCoord, bit).TEXADDR_SWIZZLE).a > aref) << bit;
142+
coverage |= (sStage0.SampleBias(smpsStage0, EvaluateAttributeAtSample(input.litCoord, bit).TEXADDR_SWIZZLE, MSAA_SAMPLE_COUNT > 4 ? -2 : -1).a > aref) << bit;
143143
}
144144
#if MSAA_SAMPLE_COUNT == 16
145145
// 16 is the max we compile for

0 commit comments

Comments
 (0)