Merge pull request #65 from lvonasek/feature_black_playermodel_fix

Black player model texture in player menu fixed
This commit is contained in:
Simon 2022-04-18 16:57:57 +01:00 committed by GitHub
commit 623e8d91a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -1266,6 +1266,13 @@ void GLSL_InitGPUShaders(void)
if (glRefConfig.swizzleNormalmap)
Q_strcat(extradefines, 1024, "#define SWIZZLE_NORMALMAP\n");
// HACK: use in main menu simple light model (to prevent issue with missing models textures)
if (Cvar_Get("r_uiFullScreen", "1", 0)->integer)
{
Q_strcat(extradefines, 1024, "#define USE_MENU_LIGHT\n");
}
if (lightType)
{
Q_strcat(extradefines, 1024, "#define USE_LIGHT\n");

View file

@ -515,5 +515,10 @@ void main()
#endif
// HACK: use in main menu simple light model (to prevent issue with missing models textures)
#if defined(USE_MENU_LIGHT)
gl_FragColor.rgb = diffuse.rgb * lightColor;
#endif
gl_FragColor.a = alpha;
}