Add lm_bounce and lm_ao to ZDRayInfo
Make vktool ignore the existing lightmap lump Ignore the lightmapper cvars in vktool
This commit is contained in:
parent
df125c3916
commit
d8d1742d0a
7 changed files with 34 additions and 10 deletions
|
|
@ -136,6 +136,8 @@ public:
|
|||
FVector3 SunDirection = FVector3(0.0f, 0.0f, -1.0f);
|
||||
FVector3 SunColor = FVector3(0.0f, 0.0f, 0.0f);
|
||||
float SunIntensity = 1.0f;
|
||||
bool AmbientOcclusion = true;
|
||||
bool LightBounce = true;
|
||||
|
||||
TArray<LevelMeshPortal> Portals;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ CVAR(Int, lm_max_updates, 128, CVAR_NOSAVE);
|
|||
CVAR(Float, lm_scale, 1.0, CVAR_NOSAVE);
|
||||
CVAR(Bool, lm_sunlight, true, CVAR_ARCHIVE);
|
||||
CVAR(Bool, lm_blur, true, CVAR_ARCHIVE);
|
||||
CVAR(Bool, lm_ao, false, CVAR_NOSAVE);
|
||||
CVAR(Bool, lm_ao, true, CVAR_ARCHIVE);
|
||||
CVAR(Bool, lm_softshadows, true, CVAR_ARCHIVE);
|
||||
CVAR(Bool, lm_bounce, false, CVAR_NOSAVE);
|
||||
CVAR(Bool, lm_bounce, true, CVAR_ARCHIVE);
|
||||
CVAR(Bool, lm_dynamic, true, CVAR_ARCHIVE);
|
||||
|
||||
VkLightmapper::VkLightmapper(VulkanRenderDevice* fb) : fb(fb)
|
||||
|
|
@ -592,14 +592,20 @@ void VkLightmapper::CreateShaders()
|
|||
|
||||
int VkLightmapper::GetRaytracePipelineIndex()
|
||||
{
|
||||
// When running as the baking tool we don't care about the CVAR or hardware preferences and only want to act on what the map specified.
|
||||
bool userSoftshadows = RunningAsTool || (lm_softshadows && useRayQuery);
|
||||
bool userAO = RunningAsTool || (lm_ao && useRayQuery);
|
||||
bool userSunlight = RunningAsTool || lm_sunlight;
|
||||
bool userBounce = RunningAsTool || lm_bounce;
|
||||
|
||||
int index = 0;
|
||||
if (lm_softshadows && useRayQuery)
|
||||
if (userSoftshadows)
|
||||
index |= 1;
|
||||
if (lm_ao && useRayQuery)
|
||||
if (mesh->AmbientOcclusion && userAO)
|
||||
index |= 2;
|
||||
if (lm_sunlight && mesh->SunColor != FVector3(0.0f, 0.0f, 0.0f))
|
||||
if (mesh->SunColor != FVector3(0.0f, 0.0f, 0.0f) && userSunlight)
|
||||
index |= 4;
|
||||
if (lm_bounce)
|
||||
if (mesh->LightBounce && userBounce)
|
||||
index |= 8;
|
||||
return index;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue