From 11ed8832984d6b7ef42143eb82d9ff7b8d6ce3f6 Mon Sep 17 00:00:00 2001 From: MAN-AT-ARMS Date: Tue, 4 Mar 2014 20:31:31 -0500 Subject: [PATCH] OpenGL2: Set default normal/specular in RE_RegisterShaderFromImage --- code/renderergl2/tr_shader.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/renderergl2/tr_shader.c b/code/renderergl2/tr_shader.c index d6e0727a..b90030c0 100644 --- a/code/renderergl2/tr_shader.c +++ b/code/renderergl2/tr_shader.c @@ -3447,6 +3447,13 @@ qhandle_t RE_RegisterShaderFromImage(const char *name, int lightmapIndex, image_ shader.lightmapIndex = lightmapIndex; for ( i = 0 ; i < MAX_SHADER_STAGES ; i++ ) { stages[i].bundle[0].texMods = texMods[i]; + + // default normal/specular + VectorSet4(stages[i].normalScale, 0.0f, 0.0f, 0.0f, 0.0f); + stages[i].specularScale[0] = + stages[i].specularScale[1] = + stages[i].specularScale[2] = r_baseSpecular->value; + stages[i].specularScale[3] = r_baseGloss->value; } //