Add sunlight/lightmap merging by multiply (r_sunlightMode 1)
Merge additive sunlight and map lighting into one GLSL shader (r_sunlightMode 2) Change single lightmap blends to use lightall
This commit is contained in:
parent
66acde6d60
commit
28e14c4546
8 changed files with 195 additions and 306 deletions
|
@ -131,7 +131,12 @@ static uniformInfo_t uniformsInfo[] =
|
|||
|
||||
{ "u_InvTexRes", GLSL_VEC2 },
|
||||
{ "u_AutoExposureMinMax", GLSL_VEC2 },
|
||||
{ "u_ToneMinAvgMaxLinear", GLSL_VEC3 }
|
||||
{ "u_ToneMinAvgMaxLinear", GLSL_VEC3 },
|
||||
|
||||
{ "u_PrimaryLightOrigin", GLSL_VEC4 },
|
||||
{ "u_PrimaryLightColor", GLSL_VEC3 },
|
||||
{ "u_PrimaryLightAmbient", GLSL_VEC3 },
|
||||
{ "u_PrimaryLightRadius", GLSL_FLOAT }
|
||||
};
|
||||
|
||||
|
||||
|
@ -1106,8 +1111,15 @@ void GLSL_InitGPUShaders(void)
|
|||
Q_strcat(extradefines, 1024, "#define USE_PARALLAXMAP\n");
|
||||
|
||||
if (i & LIGHTDEF_USE_SHADOWMAP)
|
||||
{
|
||||
Q_strcat(extradefines, 1024, "#define USE_SHADOWMAP\n");
|
||||
|
||||
if (r_sunlightMode->integer == 1)
|
||||
Q_strcat(extradefines, 1024, "#define SHADOWMAP_MODULATE\n");
|
||||
else if (r_sunlightMode->integer == 2)
|
||||
Q_strcat(extradefines, 1024, "#define USE_PRIMARY_LIGHT\n");
|
||||
}
|
||||
|
||||
if (i & LIGHTDEF_USE_TCGEN_AND_TCMOD)
|
||||
{
|
||||
Q_strcat(extradefines, 1024, "#define USE_TCGEN\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue