-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
EnvMap artifacting with 'mediump' precision on Quest 2 after upgrade from r132->r147 #25071
Comments
I can reproduce this on a Pixel 3a, Chrome 107 Android 12. |
Related: #14570 There is no real However, it was always assumed that only single code sections in the shaders require updates to make them work on |
@davehill00 Any chance you can figure out the exact version of the library that produced this change? |
Yep, I may not get to it until the weekend but I'll see if I can pinpoint the version. |
@mrdoob - took a quick look this evening. It works properly on r135, then EXR loading appears to be broken (at least for the format of EXR file I happen to have) through r140. In r141, EXR loading starts working again, and the Was EXR loading actually broken all that time (r136->r140), or was it just certain formats of EXR? If I can figure out how to generate a working EXR, I can check those last few versions to nail down which version the |
Since |
@Mugen87 FWIW, I'm seeing the failure to load in r136-r140 on Google Chrome on Mac. The EXR I am trying to load is the one referenced in the jsFiddle referenced in the original issue I opened. It's one that I rendered out in Blender. When I open it in Photoshop, it looks like it's 32bpp, which I assume means 32-but float. I also rendered out a half-float version in Blender yesterday and saw the same errors in r136-r140. |
This particular EXR issue has been fixed via #24049 in |
Can you please make a test and verify if the same banding artifacts occur with |
Okay -- created a |
As best I can tell it's not that it has problems with |
I can reproduce the issue with Chrome on a Pixel 4a, too. It seems to happen on a 3a as well, see #25071 (comment). |
I've added your patch to a modified |
I could narrow down the issue a bit. It seems changing the following line:
to
fixes the issue, too. Demo: https://jsfiddle.net/6wxabnkq/4/ So it seems the (subsequent) uv computation breaks in some way with |
Good find! That seems like a reasonable work-around. |
Maybe we figure out at some point a new way of computation that is compatible for |
Describe the bug
I recently upgraded a project from r132 -> r147. In r147, applying envmap to a MeshStandardMaterial shader set to 'mediump' precision causes cubemap artifacting on Quest 2 hardware.
To Reproduce
Steps to reproduce the behavior:
When I dig in further, it appears that the
vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt )
function in cube_uv_reflection_fragment.js is the cause of this artifacting. If I add aprecision highp float;
to the start of that function, which sets floating point precision to high just for the scope of that function IIUC, the issue goes away.I'm not sure if this also reproduces on Android devices, as I don't have easy access to one to test.
Screenshots
Platform:
The text was updated successfully, but these errors were encountered: