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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/renderergl2/tr_glsl.c b/src/renderergl2/tr_glsl.c
index 33dd0497..58a00e6e 100644
--- a/src/renderergl2/tr_glsl.c
+++ b/src/renderergl2/tr_glsl.c
@@ -321,6 +321,18 @@ static void GLSL_GetShaderHeader( GLenum shaderType, const GLcharARB *extra, cha
Q_strcat(dest, size,
va("#ifndef r_FBufScale\n#define r_FBufScale vec2(%f, %f)\n#endif\n", fbufWidthScale, fbufHeightScale));
+ if (r_materialGamma->value != 1.0f)
+ Q_strcat(dest, size, va("#ifndef r_materialGamma\n#define r_materialGamma %f\n#endif\n", r_materialGamma->value));
+
+ if (r_lightGamma->value != 1.0f)
+ Q_strcat(dest, size, va("#ifndef r_lightGamma\n#define r_lightGamma %f\n#endif\n", r_lightGamma->value));
+
+ if (r_framebufferGamma->value != 1.0f)
+ Q_strcat(dest, size, va("#ifndef r_framebufferGamma\n#define r_framebufferGamma %f\n#endif\n", r_framebufferGamma->value));
+
+ if (r_tonemapGamma->value != 1.0f)
+ Q_strcat(dest, size, va("#ifndef r_tonemapGamma\n#define r_tonemapGamma %f\n#endif\n", r_tonemapGamma->value));
+
if (extra)
{
Q_strcat(dest, size, extra);