Skip to content

Commit b2b295e

Browse files
committed
Trying to fix a compile error
Lets see if this will work.
1 parent e5eea27 commit b2b295e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

reshade-shaders/Shaders/Pirate_Depth.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//SSAO Settings
66
#define DEPTH_AO_PASSES 3 //[>1] Number of passes, more just means less noise, but costs more fps
77
#define DEPTH_AO_MIN_PASSES 2 //[>1] Minimum number of passes. Total is Minimum + Passes
8+
#define DEPTH_AO_LOOP_FIX 0 //[0 or 1] Set this to 1 if you're getting X3570 or X4579 errors.
89
#define DEPTH_AO_TAP_MODE 0 //[0 or 1] 0 - Uses four directions, 1 - Uses eight directions, slower
910

1011
#define DEPTH_AO_ENABLE 1 //[0 or 1] 0 - Off, 1 - on, turns AO on and off if you only want GI

reshade-shaders/Shaders/Pirate_Depth_SSAO.fxh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,11 @@ float4 GetAO(float2 coords)
199199
#endif
200200
const float2 pixelradius = DEPTH_AO_RADIUS * PixelSize;
201201

202+
#if DEPTH_AO_LOOP_FIX
203+
int depth_passes = DEPTH_AO_PASSES + DEPTH_AO_MIN_PASSES;
204+
#else
202205
int depth_passes = ceil(smoothstep(DEPTH_AO_FADE_END, 0.0, pointnd.w) * DEPTH_AO_PASSES) + DEPTH_AO_MIN_PASSES;
206+
#endif
203207

204208
#if DEPTH_AO_TAP_MODE
205209
const float passdiv = 8 * float(depth_passes);
@@ -208,7 +212,7 @@ float4 GetAO(float2 coords)
208212
#endif
209213

210214
float2 randomvector = GetRandomVector(coords);
211-
215+
212216
for(int p=0; p < depth_passes; p++)
213217
{
214218
int miplevel = floor(smoothstep(0.0, depth_passes, p) * DEPTH_AO_MIPLEVELS);

0 commit comments

Comments
 (0)