mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 04:12:39 +00:00
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:
parent
10abac8fa0
commit
42d2fb908c
1 changed files with 2 additions and 1 deletions
|
@ -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 );
|
||||
|
||||
}
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue