Fix sky color being too dark

This commit is contained in:
ExMatics HydrogenC
2024-06-06 12:56:32 +08:00
parent 344665e34f
commit 133340b2ea
2 changed files with 9 additions and 1 deletions
+4
View File
@@ -99,7 +99,11 @@ void Sky::Draw(RenderContext& renderContext)
psDesc.CullMode = CullMode::Inverted;
psDesc.DepthWriteEnable = false;
psDesc.DepthClipEnable = false;
#if FLAX_REVERSE_Z
psDesc.DepthFunc = ComparisonFunc::GreaterEqual;
#else
psDesc.DepthFunc = ComparisonFunc::LessEqual;
#endif
if (_psSky->Init(psDesc))
{
+5 -1
View File
@@ -34,7 +34,11 @@ MaterialInput VS(ModelInput_PosOnly input)
output.ScreenPos = output.Position;
// Place pixels on the far plane
output.Position = output.Position.xyzz;
#if FLAX_REVERSE_Z
output.Position.z = 0;
#else
output.Position.z = output.Position.w;
#endif
return output;
}