Skip to content

Commit

Permalink
change planar shadow order
Browse files Browse the repository at this point in the history
  • Loading branch information
star-e committed Jul 9, 2024
1 parent ffa5479 commit b84099e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions native/cocos/renderer/pipeline/custom/NativeBuiltinUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "cocos/renderer/pipeline/PipelineSceneData.h"
#include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h"
#include "cocos/renderer/pipeline/custom/NativePipelineTypes.h"
#include "cocos/renderer/pipeline/custom/NativeTypes.h"
#include "cocos/renderer/pipeline/custom/NativeUtils.h"
#include "cocos/renderer/pipeline/custom/RenderGraphTypes.h"
#include "cocos/renderer/pipeline/custom/details/GslUtils.h"
Expand Down Expand Up @@ -865,12 +864,17 @@ const BuiltinCascadedShadowMap *getBuiltinShadowCSM(
if (!mainLight->getNode()) {
return nullptr;
}

const pipeline::PipelineSceneData &pplSceneData = *pplRuntime.getPipelineSceneData();
auto &csmLayers = *pplSceneData.getCSMLayers();
const auto &shadows = *pplSceneData.getShadows();

const BuiltinCascadedShadowMap *result = nullptr;
// shadow type is planar
if (shadows.getType() == scene::ShadowType::PLANAR) {
return nullptr;
}

const BuiltinCascadedShadowMap *result = nullptr;
{ // find or create csm info
const BuiltinCascadedShadowMapKey key{&camera, mainLight};
auto iter = ppl.builtinCSMs.find(key);
Expand All @@ -886,10 +890,6 @@ const BuiltinCascadedShadowMap *getBuiltinShadowCSM(
if (!shadows.isEnabled()) {
return nullptr;
}
// shadow type is planar
if (shadows.getType() == scene::ShadowType::PLANAR) {
return nullptr;
}

return result;
}
Expand Down

0 comments on commit b84099e

Please sign in to comment.