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

Nodes: Only use PMREM for background when blurriness is configured. #29089

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 8, 2024

Fixed #28827.

Description

PMREM is now only used for the background when blurriness is defined. Otherwise the cube map format is used like in WebGLRenderer which should fix the quality differences mentioned in #28827.

Copy link

github-actions bot commented Aug 8, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
685.1 kB (169.6 kB) 685.1 kB (169.6 kB) +0 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
462 kB (111.5 kB) 462 kB (111.5 kB) +0 B
@Mugen87 Mugen87 added this to the r168 milestone Aug 8, 2024
@Mugen87 Mugen87 marked this pull request as draft August 8, 2024 18:31

const currentMRT = renderer.getMRT();
renderer.setMRT( null );

camera.update( renderer, scene );
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

CubeCamera.update() isn't MRT compatible so I fixed CubeRenderTarget here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We have renderer state definition and restoration in many places, I was thinking about having a way to automate this otherwise every new feature related will break the chain of nodes that use beforeUpdate() to render().

@Mugen87 Mugen87 marked this pull request as ready for review August 8, 2024 18:59
@Mugen87 Mugen87 changed the title Nodes: Only use PMREM for background when blurriness is used. Aug 8, 2024
@sunag sunag merged commit 94a841b into mrdoob:dev Aug 8, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants