Fix Global Surface Atlas drawing of objects that are hidden in GBuffer pass but should be visible for GI
This commit is contained in:
@@ -42,7 +42,7 @@ PACK_STRUCT(struct DeferredMaterialShaderData {
|
||||
|
||||
DrawPass DeferredMaterialShader::GetDrawModes() const
|
||||
{
|
||||
return DrawPass::Depth | DrawPass::GBuffer | DrawPass::MotionVectors | DrawPass::QuadOverdraw;
|
||||
return DrawPass::Depth | DrawPass::GBuffer | DrawPass::GlobalSurfaceAtlas | DrawPass::MotionVectors | DrawPass::QuadOverdraw;
|
||||
}
|
||||
|
||||
bool DeferredMaterialShader::CanUseLightmap() const
|
||||
|
||||
@@ -32,6 +32,8 @@ private:
|
||||
case DrawPass::Depth:
|
||||
return useSkinning ? &DepthSkinned : &Depth;
|
||||
case DrawPass::GBuffer:
|
||||
case DrawPass::GBuffer | DrawPass::GlobalSurfaceAtlas:
|
||||
case DrawPass::GlobalSurfaceAtlas:
|
||||
return useLightmap ? &DefaultLightmap : (useSkinning ? &DefaultSkinned : &Default);
|
||||
case DrawPass::MotionVectors:
|
||||
return useSkinning ? (perBoneMotionBlur ? &MotionVectorsSkinnedPerBone : &MotionVectorsSkinned) : &MotionVectors;
|
||||
|
||||
@@ -153,7 +153,7 @@ bool DeformableMaterialShader::Load()
|
||||
|
||||
if (_info.BlendMode == MaterialBlendMode::Opaque)
|
||||
{
|
||||
_drawModes = DrawPass::GBuffer;
|
||||
_drawModes |= DrawPass::GBuffer | DrawPass::GlobalSurfaceAtlas;
|
||||
|
||||
// GBuffer Pass
|
||||
psDesc.VS = _shader->GetVS("VS_SplineModel");
|
||||
@@ -162,7 +162,7 @@ bool DeformableMaterialShader::Load()
|
||||
}
|
||||
else
|
||||
{
|
||||
_drawModes = DrawPass::Forward;
|
||||
_drawModes |= DrawPass::Forward;
|
||||
|
||||
// Forward Pass
|
||||
psDesc.VS = _shader->GetVS("VS_SplineModel");
|
||||
|
||||
@@ -25,6 +25,8 @@ private:
|
||||
case DrawPass::Depth:
|
||||
return &Depth;
|
||||
case DrawPass::GBuffer:
|
||||
case DrawPass::GBuffer | DrawPass::GlobalSurfaceAtlas:
|
||||
case DrawPass::GlobalSurfaceAtlas:
|
||||
case DrawPass::Forward:
|
||||
return &Default;
|
||||
#if USE_EDITOR
|
||||
|
||||
@@ -39,7 +39,7 @@ PACK_STRUCT(struct TerrainMaterialShaderData {
|
||||
|
||||
DrawPass TerrainMaterialShader::GetDrawModes() const
|
||||
{
|
||||
return DrawPass::Depth | DrawPass::GBuffer;
|
||||
return DrawPass::Depth | DrawPass::GBuffer | DrawPass::GlobalSurfaceAtlas;
|
||||
}
|
||||
|
||||
bool TerrainMaterialShader::CanUseLightmap() const
|
||||
|
||||
@@ -26,6 +26,8 @@ private:
|
||||
case DrawPass::Depth:
|
||||
return &Depth;
|
||||
case DrawPass::GBuffer:
|
||||
case DrawPass::GBuffer | DrawPass::GlobalSurfaceAtlas:
|
||||
case DrawPass::GlobalSurfaceAtlas:
|
||||
return useLightmap ? &DefaultLightmap : &Default;
|
||||
#if USE_EDITOR
|
||||
case DrawPass::QuadOverdraw:
|
||||
|
||||
Reference in New Issue
Block a user