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

workaround for Pixel PMREM #23841

Merged
merged 2 commits into from
Apr 5, 2022
Merged

workaround for Pixel PMREM #23841

merged 2 commits into from
Apr 5, 2022

Conversation

elalish
Copy link
Contributor

@elalish elalish commented Apr 4, 2022

Related issue: google/model-viewer#3336

The error was also visible on this example: https://threejs.org/examples/?q=hdr#webgl_materials_envmaps_hdr If you used a Pixel phone and set metalness = 1 and roughness = ~0.1 (this was only to make it the most obvious, and it's still kind of subtle):
image
Note the faint black lines in the sky, following the corners of the cube map.

Anyway, I'm pretty sure I found at least two different Pixel GPU driver bugs, but I could not pin down what was causing them. I did find two workarounds though:

  1. Increasing the padding on the cube sides from half a pixel to a full pixel fixed the visible seams.
  2. While I was debugging and had PMREM blur disabled, I noticed a bizarre artifact in the lower mips where I was really not getting the right data (again, only on Pixel). It was probably masked by all the blurring on top of it, but I found that giving the texture a little padding on the top mostly fixed it, so I went ahead and included that here too, since who knows when it might become a visible artifact.

@mrdoob, thanks for noticing, though I wish I had a more satisfying answer.

@mrdoob mrdoob added this to the r140 milestone Apr 5, 2022
@mrdoob mrdoob merged commit ba6140a into mrdoob:dev Apr 5, 2022
@mrdoob
Copy link
Owner

mrdoob commented Apr 5, 2022

Thanks!

abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* workaround for Pixel PMREM

* addressing feedback
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