Skip to content

Commit

Permalink
Fixed an IL compile bug
Browse files Browse the repository at this point in the history
Now the shader compiles with IL turned off.
  • Loading branch information
Heathen committed Nov 23, 2016
1 parent fe39697 commit 41fc420
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions reshade-shaders/Shaders/Pirate_SSAOILSC.fx
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,14 @@ float4 GetAO(float2 coords)
}
}

#if DEPTH_AO_IL_ENABLE
ilum /= passdiv;
#else
ilum = 0.0;
#endif
#if DEPTH_AO_USE_SCATTER
scatter /= passdiv;
#endif
#if DEPTH_AO_USE_ALCHEMY
occlusion = (2 * DEPTH_AO_ALCHEMY_STRENGTH / passdiv) * occlusion;
#else
Expand All @@ -377,6 +383,7 @@ float4 GetAO(float2 coords)
occlusion = (sin(threepitwo + occlusion * pi) + 1) / 2;
occlusion = saturate(occlusion * DEPTH_AO_STRENGTH);

#if DEPTH_AO_IL_ENABLE
//if (DEPTH_AO_IL_CURVE_MODE == 0) // Linear
//Do Nothing
if (DEPTH_AO_IL_CURVE_MODE == 1) // Squared
Expand All @@ -388,7 +395,9 @@ float4 GetAO(float2 coords)
else if (DEPTH_AO_IL_CURVE_MODE == 4) // Mid range Sine
ilum = sin(ilum * pi);
ilum = saturate(ilum * DEPTH_AO_IL_STRENGTH);
#endif

#if DEPTH_AO_USE_SCATTER
//if (DEPTH_AO_IL_CURVE_MODE == 0) // Linear
//Do Nothing
if (DEPTH_AO_SCATTER_CURVE_MODE == 1) // Squared
Expand All @@ -400,6 +409,7 @@ float4 GetAO(float2 coords)
else if (DEPTH_AO_SCATTER_CURVE_MODE == 4) // Mid range Sine
scatter = sin(scatter * pi);
scatter = saturate(scatter * DEPTH_AO_SCATTER_STRENGTH * 10.0);
#endif

ilum += scatter;
return fade * float4(ilum, occlusion);
Expand Down

0 comments on commit 41fc420

Please sign in to comment.