Skip to content

Commit

Permalink
OpenGL2: Set default normal/specular in RE_RegisterShaderFromImage
Browse files Browse the repository at this point in the history
  • Loading branch information
MAN-AT-ARMS committed Mar 5, 2014
1 parent ee67d0a commit 11ed883
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/renderergl2/tr_shader.c
Expand Up @@ -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;
}

//
Expand Down

0 comments on commit 11ed883

Please sign in to comment.