Skip to content

Commit f52cfff

Browse files
committed
Use macros
1 parent af04945 commit f52cfff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/shader-chunks/shaders/camera-pars.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ uniform vec3 cameraParams;
99
// Define macro functions for calculating viewZ depending on the camera type.
1010
#ifdef PERSPECTIVE_CAMERA
1111

12-
#define getViewZ(depth) perspectiveDepthToViewZ(depth, cameraParams.x, cameraParams.y)
12+
#define getViewZ(depth) perspectiveDepthToViewZ(depth, CAMERA_NEAR, CAMERA_FAR)
1313

1414
#else
1515

16-
#define getViewZ(depth) orthographicDepthToViewZ(depth, cameraParams.x, cameraParams.y)
16+
#define getViewZ(depth) orthographicDepthToViewZ(depth, CAMERA_NEAR, CAMERA_FAR)
1717

1818
#endif
1919

0 commit comments

Comments
 (0)