OpenGL2: Fix parsing specularScale in shaders

Fix specularScale <metallic> <smoothness> with r_pbr 1 which has been
broken since r_pbr was implemented in 2016.

Fix specularScale <r> <g> <b> <gloss> setting b to gloss and leaving
gloss as 0 since it was implemented in 2014.
This commit is contained in:
Zack Middleton 2018-05-11 23:10:59 -05:00
parent 10abac8fa0
commit 42d2fb908c

View file

@ -1115,6 +1115,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
stage->specularScale[1] = (stage->specularScale[0] < 0.5f) ? 0.0f : 1.0f;
stage->specularScale[0] = smoothness;
}
else
{
// two values, rgb then gloss
stage->specularScale[3] = stage->specularScale[1];
@ -1133,7 +1134,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
continue;
}
stage->specularScale[2] = atof( token );
stage->specularScale[3] = atof( token );
}
//