summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_glsl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderergl2/tr_glsl.c')
-rw-r--r--src/renderergl2/tr_glsl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/renderergl2/tr_glsl.c b/src/renderergl2/tr_glsl.c
index ed078ddf..cb00e91c 100644
--- a/src/renderergl2/tr_glsl.c
+++ b/src/renderergl2/tr_glsl.c
@@ -79,10 +79,12 @@ static uniformInfo_t uniformsInfo[] =
{ "u_ShadowMap", GLSL_INT },
{ "u_ShadowMap2", GLSL_INT },
{ "u_ShadowMap3", GLSL_INT },
+ { "u_ShadowMap4", GLSL_INT },
{ "u_ShadowMvp", GLSL_MAT16 },
{ "u_ShadowMvp2", GLSL_MAT16 },
{ "u_ShadowMvp3", GLSL_MAT16 },
+ { "u_ShadowMvp4", GLSL_MAT16 },
{ "u_EnableTextures", GLSL_VEC4 },
@@ -1302,7 +1304,8 @@ void GLSL_InitGPUShaders(void)
if (r_shadowFilter->integer >= 2)
Q_strcat(extradefines, 1024, "#define USE_SHADOW_FILTER2\n");
- Q_strcat(extradefines, 1024, "#define USE_SHADOW_CASCADE\n");
+ if (r_shadowCascadeZFar->integer != 0)
+ Q_strcat(extradefines, 1024, "#define USE_SHADOW_CASCADE\n");
Q_strcat(extradefines, 1024, va("#define r_shadowMapSize %d\n", r_shadowMapSize->integer));
Q_strcat(extradefines, 1024, va("#define r_shadowCascadeZFar %f\n", r_shadowCascadeZFar->value));
@@ -1320,6 +1323,7 @@ void GLSL_InitGPUShaders(void)
GLSL_SetUniformInt(&tr.shadowmaskShader, UNIFORM_SHADOWMAP, TB_SHADOWMAP);
GLSL_SetUniformInt(&tr.shadowmaskShader, UNIFORM_SHADOWMAP2, TB_SHADOWMAP2);
GLSL_SetUniformInt(&tr.shadowmaskShader, UNIFORM_SHADOWMAP3, TB_SHADOWMAP3);
+ GLSL_SetUniformInt(&tr.shadowmaskShader, UNIFORM_SHADOWMAP4, TB_SHADOWMAP4);
qglUseProgramObjectARB(0);
GLSL_FinishGPUShader(&tr.shadowmaskShader);