fix:xr skip shadowCulling when camera culling enable is false (#14343)

if not right eye will not show shadow
This commit is contained in:
oahc09
2023-02-27 09:30:05 +08:00
committed by GitHub
parent 8e7d92cbae
commit bde33a6367
@@ -70,7 +70,10 @@ void ShadowMapBatchedQueue::gatherLightPasses(const scene::Camera *camera, const
} else {
layer = csmLayers->getLayers()[level];
}
shadowCulling(_pipeline, camera, layer);
bool isCullingEnable = camera->isCullingEnabled();
if (isCullingEnable) {
shadowCulling(_pipeline, camera, layer);
}
const RenderObjectList &dirShadowObjects = layer->getShadowObjects();
for (const auto &ro : dirShadowObjects) {
add(ro.model);