Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3.8.4 pipeline reflection probe #17585

Closed
wants to merge 3 commits into from

Conversation

star-e
Copy link
Contributor

@star-e star-e commented Aug 28, 2024

Re: #

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

Greptile Summary

Based on the changes in NativeRenderGraph.cpp, here are the key points about the implementation of reflection probes and scene culling optimizations:

  • Added setCullingWorldBounds method to NativeSceneBuilder class, allowing setting of an axis-aligned bounding box (AABB) for scene culling
  • Introduced worldBounds field in SceneData structure to store the culling bounds
  • Updated CullingFlags to include WORLD_BOUNDS flag for optimized culling
  • Enhanced SceneBuilder to support reflection probe functionality

These changes enable more efficient scene culling by using world bounds and improve support for reflection probes in the custom rendering pipeline. The additions align with the pull request's focus on implementing reflection probes and optimizing scene culling.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

@@ -221,6 +222,10 @@ export class WebSceneBuilder extends WebSetter implements SceneBuilder {
const layoutName = this._renderGraph.getLayout(passId);
setShadowUBOLightView(this, this._scene.camera, light, csmLevel, layoutName);
}
setCullingWorldBounds (aabb: AABB): void {
this._scene.cullingFlags |= CullingFlags.WORLD_BOUNDS;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Use bitwise OR to add WORLD_BOUNDS flag

Copy link

github-actions bot commented Aug 28, 2024

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -35955,8 +35955,9 @@
              * @param csmLevel @en Curent level of cascaded shadow map @zh 级联阴影等级
              * @param optCamera @en Additional scene culling camera. @zh 额外的场景裁切相机
              */
             useLightFrustum(light: renderer.scene.Light, csmLevel?: number, optCamera?: renderer.scene.Camera): void;
+            setCullingWorldBounds(aabb: geometry.AABB): void;
         }
         /**
          * @en Render queue
          * A render queue is an abstraction of graphics commands submission.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@star-e star-e closed this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant