question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MeshStandardMaterial iOS rendering issues

See original GitHub issue

Hi there,

I think I might have found a bug on iOS. I have a MeshStandardMaterial working with a texture for its roughness(green), metallic(blue) and AO(red) channels…

In my case AO is not used, so red channel is empty. This causes iOS to render incorrectly or at least completely different than any other platform including Safari on OS X, Android, Chrome, etc. The resulting rendering on iOS is completely dark. If I remove the aoMap linkage to texture the render is then fixed, but shouldn’t it be ignored like in other platforms?

Unfortunately I can’t share this particular example right now cause it is for a commercial project under development but can try to put another example online if you can confirm this is a bug.

Many thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jocabolacommented, Nov 14, 2019

Yes, it is a PNG and it does look like it could be a premultiplied alpha issue.

1reaction
jocabolacommented, Nov 14, 2019

Hello,

Thanks a lot for your feedback. I have been isolating a simpler example and I wasn’t able to longer reproduce this behaviour…

After digging a bit further in, turns out that it might be related to the texture I was using since this had an alpha channel which is probably messing with the RGB channels in iOS somehow. If I don’t have a transparent background the behaviour in all platforms is identical but if there is an alpha channel (even not affecting the rendered surface) things go funky on iOS. Getting very different results. Perhaps this is a known behaviour already. Nevertheless it will be a different bug then and I should do a bit more testing before posting a new issue. Also, it makes no sense to have transparent pixels on a PBR texture for roughness/metalness/AO.

Thanks and sorry for the misleading initial post!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Black unreflective faces using MeshStandardMaterial in three.js
I'm a beginner to three.js and 3d graphics in general. ... At first I thought there could be some problem with the vertex...
Read more >
AR with transparency in material issue - Soft8Soft
Hei I'm having some issues with the alpha in a material, trying to make it for AR for IOS. I attached a few...
Read more >
MeshStandardMaterial – three.js docs
A standard physically based material, using Metallic-Roughness workflow. Physically based rendering (PBR) has recently become the standard in many 3D ...
Read more >
Matt DesLauriers on Twitter: "Real-time shadows and ...
This is especially a problem for retina laptops. If your design allows it: ... NanoGL's physically based rendering runs pretty well on an...
Read more >
Extending three.js materials with GLSL | by Dusan Bosnjak
MeshStandardMaterial extended with specular/gloss + instancing +map ... Almost all rendering operations are somehow tied to a material.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found