summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMAN-AT-ARMS <donny@ecgnetwork.com>2014-03-04 20:31:31 -0500
committerTim Angus <tim@ngus.net>2014-06-17 17:43:40 +0100
commit2b651750fa10b01feb17d59677a60400be35f013 (patch)
tree145e2da9e59d30aa496924a20d4d41b5907d2fbf /src
parent481fb3d91804c8ffd701442ee70b96faae737370 (diff)
OpenGL2: Set default normal/specular in RE_RegisterShaderFromImage
Diffstat (limited to 'src')
-rw-r--r--src/renderergl2/tr_shader.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/renderergl2/tr_shader.c b/src/renderergl2/tr_shader.c
index 1a46ebd0..2c06d62a 100644
--- a/src/renderergl2/tr_shader.c
+++ b/src/renderergl2/tr_shader.c
@@ -3448,6 +3448,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;
}
//