Skip to content

Commit 219b3d3

Browse files
committed
fixed vertical fog applying in ForwardAddd pass
1 parent fe68d19 commit 219b3d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Packages/sh.orels.shaders.generator/Runtime/Sources/Modules/VerticalFog.orlsource

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323
%Color("VerticalFogColor")
2424
{
2525
void VerticalFogColor(MeshData d, inout half4 FinalColor) {
26+
#if defined(UNITY_PASS_FORWARDBASE)
2627
half mask = saturate(remap(d.worldSpacePosition.y, _VFStart, _VFEnd, 0, 1));
2728
mask = pow(mask, _VFPow);
2829
half4 col = lerp(_VFBottomColor, _VFTopColor, mask);
2930
FinalColor.rgb *= _VFGlobalTint;
3031
FinalColor.rgb = lerp(FinalColor.rgb, col.rgb, col.a);
32+
#endif
3133
}
3234
}

0 commit comments

Comments
 (0)