Skip to content

fix planar reflections for editor camera previews - #236

Merged
star-e merged 6 commits into
cocos:v4.0.0from
xubing0906:v4.0.0-planar-reflection
Aug 17, 2026
Merged

fix planar reflections for editor camera previews#236
star-e merged 6 commits into
cocos:v4.0.0from
xubing0906:v4.0.0-planar-reflection

Conversation

@xubing0906

@xubing0906 xubing0906 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Re: cocos/cocos-engine#18085

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.

@xubing0906 xubing0906 added the investigation Investigate the impact on the code base label Jul 31, 2026
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Code Size Check Report

Wechat (WASM) Before After Diff
2D Empty (legacy pipeline) 1015084 bytes 1015269 bytes ⚠️ +185 bytes
2D All (legacy pipeline) 2682815 bytes 2683000 bytes ⚠️ +185 bytes
2D All (new pipeline) 2774788 bytes 2774955 bytes ⚠️ +167 bytes
(2D + 3D) All 10032207 bytes 10032397 bytes ⚠️ +190 bytes
Web (WASM + ASMJS) Before After Diff
(2D + 3D) All 16868625 bytes 16868815 bytes ⚠️ +190 bytes

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -45497,9 +45497,9 @@
          * @zh 设置probe信息
          * @param probe
          * @param frameBuffer
          */
-        setUsageInfo(probe: renderer.scene.ReflectionProbe, frameBuffer: gfx.Framebuffer): void;
+        setUsageInfo(probe: renderer.scene.ReflectionProbe, frameBuffer: gfx.Framebuffer, reflectionCamera?: renderer.scene.Camera): void;
         destroy(): void;
         clearFramebuffer(camera: renderer.scene.Camera): void;
         render(camera: renderer.scene.Camera): void;
         activate(pipeline: ForwardPipeline, flow: ReflectionProbeFlow): void;

@xubing0906

Copy link
Copy Markdown
Contributor Author

@cocos-robot run test cases

@github-actions

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

@github-actions

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

@github-actions

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

Platform build boot runned crashScene FailScene
web-mobile PASS PASS FAIL graphics-continuous-filling
ios PASS PASS PASS
mac PASS PASS PASS

@github-actions

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

Platform build boot runned crashScene FailScene
web-mobile PASS PASS FAIL
ios PASS PASS PASS
mac PASS PASS PASS

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

@xubing0906

Copy link
Copy Markdown
Contributor Author

测试方式,打开cocos-test-projects工程的planar-reflection-probe场景,点击场景树的Main Camera节点,观察右下角的预览小窗
image
正确效果
image
错误效果
image

…review

Legacy ReflectionProbeFlow was calling renderPlanarReflection() for
PREVIEW cameras, which overwrites the main probe camera state and
can corrupt Scene View / Game View reflections. Switch to
renderPreviewPlanarReflection() and pass the isolated reflection
camera through the stage and queue chain.
@github-actions

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

@github-actions

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

@xubing0906 xubing0906 removed the investigation Investigate the impact on the code base label Aug 12, 2026
@xubing0906

Copy link
Copy Markdown
Contributor Author

@cocos-robot run-test-cases-custom

@xubing0906 xubing0906 closed this Aug 12, 2026
@xubing0906 xubing0906 reopened this Aug 12, 2026
@github-actions

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

Platform build boot runned crashScene FailScene
web-mobile PASS PASS FAIL SpineAttach,SpineBoy,SpineCollider,SpineMesh,SpineAttachment,SpinePhysics,particle-compare,tween-clone,scroll-view-scroll-to-offset
ios PASS PASS PASS
mac PASS PASS PASS

@github-actions

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

Platform build boot runned crashScene FailScene
windows PASS PASS PASS
android PASS PASS FAIL BuildTimeConstantsTest
wechatgame PASS PASS FAIL particle-compare,BuildTimeConstantsTest

@xubing0906

Copy link
Copy Markdown
Contributor Author

@cocos-robot run test cases

@github-actions

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

@github-actions

Copy link
Copy Markdown

@xubing0906, Please check the result of run test cases:

Task Details

@star-e
star-e merged commit e317c04 into cocos:v4.0.0 Aug 17, 2026
14 checks passed
@xubing0906
xubing0906 deleted the v4.0.0-planar-reflection branch August 20, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants