Skip to content

Commit

Permalink
add empty light buffer guard
Browse files Browse the repository at this point in the history
  • Loading branch information
star-e committed Oct 10, 2023
1 parent dc4a57d commit 3c0ff56
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions native/cocos/renderer/pipeline/custom/NativeSceneCulling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,9 @@ void LightResource::clear() {
}

void LightResource::buildLightBuffer(gfx::CommandBuffer* cmdBuffer) const {
if(lights.empty()) {
return;
}
cmdBuffer->updateBuffer(
lightBuffer,
cpuBuffer.data(),
Expand Down

0 comments on commit 3c0ff56

Please sign in to comment.