Skip to content

Commit 24b0c56

Browse files
committed
Fix macros
Three does set a macro for reverse depth, it's just called differently. And LOG_DEPTH was wrong too.
1 parent e3ab65e commit 24b0c56

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/shader-chunks/shaders/depth-utils-pars.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ float readDepth(sampler2D depthBuffer, const in vec2 uv, const in float near, co
1212

1313
float depth = texture(depthBuffer, uv).r;
1414

15-
#ifdef REVERSE_DEPTH
15+
#ifdef USE_REVERSEDEPTHBUF
1616

1717
return 1.0 - depth;
1818

1919
#else
2020

21-
#ifdef LOG_DEPTH
21+
#ifdef USE_LOGDEPTHBUF
2222

2323
float d = pow(2.0, depth * log2(far + 1.0)) - 1.0;
2424
float a = far / (far - near);

0 commit comments

Comments
 (0)