Skip to content

Commit

Permalink
Fix shader compile when r_sunlightmode == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
SomaZ committed Jul 2, 2023
1 parent 5ff5390 commit 0237769
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions codemp/rd-rend2/glsl/lightall.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ in vec4 var_LightDir;
out vec4 out_Color;
out vec4 out_Glow;

#if defined(USE_SHADOWMAP)
// depth is GL_DEPTH_COMPONENT16
// so the maximum error is 1.0 / 2^16
#define DEPTH_MAX_ERROR 0.0000152587890625
Expand Down Expand Up @@ -583,11 +584,9 @@ float sunShadow(in vec3 viewOrigin, in vec3 viewDir, in vec3 biasOffset)

return result;
}

#define EPSILON 0.00000001
#endif

#if defined(USE_PARALLAXMAP)

float RayIntersectDisplaceMap(in vec2 inDp, in vec2 ds, in sampler2D normalMap, in float parallaxBias)
{
const int linearSearchSteps = 16;
Expand Down

0 comments on commit 0237769

Please sign in to comment.