Add ViewFlags::Sky for conditional sky/skybox rendering
This commit is contained in:
@@ -81,7 +81,7 @@ void Sky::InitConfig(AtmosphericFogData& config) const
|
||||
|
||||
void Sky::Draw(RenderContext& renderContext)
|
||||
{
|
||||
if (HasContentLoaded())
|
||||
if (HasContentLoaded() && EnumHasAnyFlags(renderContext.View.Flags, ViewFlags::Sky))
|
||||
{
|
||||
// Ensure to have pipeline state cache created
|
||||
if (_psSky == nullptr || _psFog == nullptr)
|
||||
|
||||
@@ -40,7 +40,7 @@ void Skybox::Draw(RenderContext& renderContext)
|
||||
setupProxy();
|
||||
isReady = _proxyMaterial && _proxyMaterial->IsReady();
|
||||
}
|
||||
if (isReady)
|
||||
if (isReady && EnumHasAnyFlags(renderContext.View.Flags, ViewFlags::Sky))
|
||||
{
|
||||
renderContext.List->Sky = this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user