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

PMREMGenerator: Add optional renderTarget in fromScene() #29959

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Nov 25, 2024

Related issue: #29951, #29942

Description

This PR improves backwards compatibility, even if the device is not initialized it returns the texture it will later use to generate the PMREM but keep the warnings.

  • Add optional renderTarget in fromScene()
  • Return the RenderTarget if asynchronous calls necessary instead of Promise.

image

@sunag sunag added the WebGPU label Nov 25, 2024
@sunag sunag changed the title PMREMGenerator: Add optional renderTarget in fromScene(), improves backwards compatibility PMREMGenerator: Add optional renderTarget in fromScene() Nov 25, 2024
@sunag sunag added this to the r171 milestone Nov 25, 2024
Copy link

github-actions bot commented Nov 25, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.14
78.99
339.14
78.99
+0 B
+0 B
WebGPU 483.15
134.15
483.41
134.17
+260 B
+17 B
WebGPU Nodes 482.62
134.06
482.88
134.07
+260 B
+15 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 464.59
111.96
464.59
111.96
+0 B
+0 B
WebGPU 552.25
149.49
552.51
149.51
+260 B
+26 B
WebGPU Nodes 508.13
139.2
508.39
139.23
+260 B
+24 B

@sunag sunag marked this pull request as ready for review November 25, 2024 05:26
@sunag sunag merged commit 4749f99 into mrdoob:dev Nov 25, 2024
12 checks passed
@sunag sunag deleted the dev-pmrem-target branch November 25, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant