Skip to content

Commit

Permalink
Small refactor to separate composition update from framegraph building (
Browse files Browse the repository at this point in the history
#6333)

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
  • Loading branch information
mvaligursky and Martin Valigursky committed May 1, 2024
1 parent 5a34e87 commit a956aca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/framework/app-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,10 @@ class AppBase extends EventHandler {
// render a layer composition
renderComposition(layerComposition) {
DebugGraphics.clearGpuMarkers();

// update composition, cull everything, assign atlas slots for clustered lighting
this.renderer.update(layerComposition);

this.renderer.buildFrameGraph(this.frameGraph, layerComposition);
this.frameGraph.render(this.graphicsDevice);
}
Expand Down
3 changes: 0 additions & 3 deletions src/scene/renderer/forward-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,6 @@ class ForwardRenderer extends Renderer {
const scene = this.scene;
frameGraph.reset();

// update composition, cull everything, assign atlas slots for clustered lighting
this.update(layerComposition);

if (scene.clusteredLightingEnabled) {

// clustered lighting passes
Expand Down

0 comments on commit a956aca

Please sign in to comment.