-
-
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
MeshStandardMaterial renders black on iOS #17113
Comments
There isn't much we can do without a working link or a jsfiddle... |
apologies, I couldn't replicate it using boilderplate code and the PlaneBufferGeometry. UPDATE: |
@MrJoshBowman Do not get into the habit of blaming the library when your code does not work. |
I submitted it because it was inconsistent behaviour. In the year I've been learning three.js I haven't ever posted a bug report or blamed the library. 'mediump' ignores normals for the MeshStandardMaterial at creation of geo and buffergeo producing non-black squares, and MeshLambertMaterial ignores normals at creation of geo and buffergeo producing non-black squares, That's inconsistent behaviour in the MeshStandardMaterial library, which i had to find a work around for. I'm fine with being accused of my code not working because of a library inconsistency 'gotcha', and that's why I updated my report. It works fine on PCs and laptops, just not iOS hardware. |
Would be great if you could figure out why that's the case. |
I am getting a similar problem, my stuff renders with MeshStandardMaterial just fine on most devices, but then on Galaxy S9 it goes completely crazy. I haven't been able to isolate the problem with a jsfiddle as its part of a complicated system, but I do find it weird that it only reproes on some devices. I ended up just doing a work around and checking for the user agent string and then switching to MeshPhongMaterial if it is on android |
I'm afraid that's not unusual. Different devices have different GPUs and drivers. But without a live example for reproduction it is almost impossible to find the root cause for this issue. |
Using Three.js v105-106
I've just switched all my Geometry object code over to creating pure BufferGeometry and when I was testing it on my laptop across browsers the mesh and textures appeared without issue.
However, when i tested them on iOS browsers, any BufferGeometry with a MeshStandardMaterial rendered as black, still with its texture alphas.
I tried switching back to standard Geometry with MeshStandardMaterial and everything worked fine on iOS again. I also swapped back to BufferGeometry and tried a MeshBasicMaterial and MeshLambertMaterial, both of which worked totally fine.
Browser
OS
Hardware Requirements (graphics card, VR Device, ...)
The text was updated successfully, but these errors were encountered: