Split builtin depth-style concrete passes
This commit is contained in:
@@ -1,16 +1,11 @@
|
||||
#include "Rendering/Passes/BuiltinDepthStylePassBase.h"
|
||||
#include "Rendering/Passes/BuiltinDepthOnlyPass.h"
|
||||
#include "Rendering/Passes/BuiltinShadowCasterPass.h"
|
||||
|
||||
#include "Components/GameObject.h"
|
||||
#include "Components/MeshRendererComponent.h"
|
||||
#include "Core/Asset/ResourceManager.h"
|
||||
#include "Debug/Logger.h"
|
||||
#include "RHI/RHICommandList.h"
|
||||
#include "Rendering/Detail/ShaderVariantUtils.h"
|
||||
#include "Rendering/RenderSceneExtractor.h"
|
||||
#include "Rendering/RenderSurface.h"
|
||||
#include "Resources/BuiltinResources.h"
|
||||
#include "Resources/Material/Material.h"
|
||||
#include "Resources/Mesh/Mesh.h"
|
||||
|
||||
@@ -716,38 +711,6 @@ bool BuiltinDepthStylePassBase::DrawVisibleItem(
|
||||
return true;
|
||||
}
|
||||
|
||||
BuiltinDepthOnlyPass::BuiltinDepthOnlyPass()
|
||||
: BuiltinDepthStylePassBase(
|
||||
BuiltinMaterialPass::DepthOnly,
|
||||
Resources::GetBuiltinDepthOnlyShaderPath()) {
|
||||
}
|
||||
|
||||
RHI::InputLayoutDesc BuiltinDepthOnlyPass::BuildInputLayout() {
|
||||
return BuildCommonInputLayout();
|
||||
}
|
||||
|
||||
const char* BuiltinDepthOnlyPass::GetName() const {
|
||||
return "BuiltinDepthOnlyPass";
|
||||
}
|
||||
|
||||
BuiltinShadowCasterPass::BuiltinShadowCasterPass()
|
||||
: BuiltinDepthStylePassBase(
|
||||
BuiltinMaterialPass::ShadowCaster,
|
||||
Resources::GetBuiltinShadowCasterShaderPath()) {
|
||||
}
|
||||
|
||||
RHI::InputLayoutDesc BuiltinShadowCasterPass::BuildInputLayout() {
|
||||
return BuildCommonInputLayout();
|
||||
}
|
||||
|
||||
const char* BuiltinShadowCasterPass::GetName() const {
|
||||
return "BuiltinShadowCasterPass";
|
||||
}
|
||||
|
||||
bool BuiltinShadowCasterPass::ShouldRenderVisibleItem(const VisibleRenderItem& visibleItem) const {
|
||||
return visibleItem.meshRenderer == nullptr || visibleItem.meshRenderer->GetCastShadows();
|
||||
}
|
||||
|
||||
} // namespace Passes
|
||||
} // namespace Rendering
|
||||
} // namespace XCEngine
|
||||
|
||||
Reference in New Issue
Block a user