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: Make blur order consistent. #28166

Merged
merged 2 commits into from Apr 20, 2024

Conversation

elalish
Copy link
Contributor

@elalish elalish commented Apr 19, 2024

Related #28071

Description

Here I've tweaked the ordering of the blur directions so they are anchored by the bottom of the stack instead of the top - this way when using two differently-sized environments, once the larger has been blurred down to the smaller, they follow exactly the same operations for the rest of the mip levels. Before, the axis direction of the blur was cycled from the top, so it used a different sequence for the lower mips based on how many there were total.

This does make the result look more consistent, but sadly it does nothing regarding the overall increased brightness of the PMREM for lower-res versions of the same HDR. That is very strange - I think the fundamental issue is that the HDR in question is dominated by the sun, which is just a few pixels of extremely high intensity, which dominate the blur results. My lat/long blur is certainly unusual - I'm curious if it ends up biasing the result, perhaps more as bright pixels are farther from the equator? @WestLangley if you'd like to take a look at my blur math, I'd appreciate it. I haven't found anything glaring yet, and I'm out next week.

FYI @mrdoob

Copy link

github-actions bot commented Apr 19, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
674.4 kB (167.1 kB) 674.4 kB (167.2 kB) +12 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
453.8 kB (109.6 kB) 453.8 kB (109.6 kB) +12 B

@Mugen87 Mugen87 added this to the r164 milestone Apr 20, 2024
@Mugen87 Mugen87 merged commit 812cf86 into mrdoob:dev Apr 20, 2024
12 checks passed
@Mugen87 Mugen87 changed the title make PMREM blur order consistent PMREMGenerator: Make blur order consistent. Apr 20, 2024
@mrdoob
Copy link
Owner

mrdoob commented Apr 20, 2024

FYI @sunag

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.

None yet

3 participants