Add gl_fakemodellightintensity to allow adjusting the fake sunlight's intensity on models
This commit is contained in:
parent
7a59234bb4
commit
166f0cdc5b
3 changed files with 4 additions and 2 deletions
|
|
@ -180,4 +180,5 @@ int get_gl_spritelight()
|
|||
return gl_spritelight < 0 ? (screen->IsRayQueryEnabled() ? 1 : 0) : gl_spritelight;
|
||||
}
|
||||
|
||||
CVAR(Bool, gl_fakemodellight, true, CVAR_GLOBALCONFIG | CVAR_ARCHIVE)
|
||||
CVARD(Bool, gl_fakemodellight, true, CVAR_GLOBALCONFIG | CVAR_ARCHIVE, "adds a fake sunlight on models to improve contrast")
|
||||
CVARD(Float, gl_fakemodellightintensity, 0.05, CVAR_GLOBALCONFIG | CVAR_ARCHIVE, "fake sunlight intensity (brightness)")
|
||||
|
|
|
|||
|
|
@ -66,3 +66,4 @@ EXTERN_CVAR(Color, gl_wireframecolor)
|
|||
int get_gl_spritelight();
|
||||
|
||||
EXTERN_CVAR(Bool, gl_fakemodellight)
|
||||
EXTERN_CVAR(Float, gl_fakemodellightintensity)
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ void HWDrawInfo::GetDynSpriteLightList(AActor *self, double x, double y, double
|
|||
if(isModel && gl_fakemodellight)
|
||||
{
|
||||
//fake light for contrast
|
||||
AddSunLightToList(modellightdata, x, y, z, FVector3(Level->SunDirection.X + 180, 45, 0), Level->SunColor * Level->SunIntensity * 0.05, false);
|
||||
AddSunLightToList(modellightdata, x, y, z, FVector3(Level->SunDirection.X + 180, 45, 0), Level->SunColor * Level->SunIntensity * gl_fakemodellightintensity, false);
|
||||
}
|
||||
|
||||
if ((level.lightmaps && gl_spritelight > 0) || ActorTraceStaticLight::TraceSunVisibility(x, y, z, traceCache, (self ? staticLight.ActorMoved : traceCache ? traceCache->Pos != DVector3(x, y, z) : false)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue