PMREMGenerator: Make blur order consistent. #28166
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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