gl_FrontFace not working properly Adreno 530 on double sided materials (Samsung S7, OnePlus 3, Pixel, etc.) #10331

Closed
bhouston opened this Issue Dec 11, 2016 · 0 comments

Projects

None yet

1 participant

@bhouston
Contributor
bhouston commented Dec 11, 2016 edited
Description of the problem

So Qualcomm appears to have messed up gl_FrontFacing on a number of their GPUs when using double sided rendering. It affects at least the Adreno 530 series of GPUs - which are used by most of the highest end phones around including Samsung Galaxy S7, OnePlus 3 (my current phone), and the Google Pixel.

I have a reproduction case in my latest PR: #10330

When using "front sided" on the EnvMap HDR example on Adren 530 you get this:

image

When using "double sided" on the EnvMap HDR example on Adren 530 you get this (but it still looks like the above on desktop and on other GPUs) :

image

After a ton of work I traced the issue to the flipNormal value here:

https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderChunk/normal_flip.glsl#L2

Basically it seems that with Physical materials this gl_FrontFace is not working properly with double sided materials on Adreno GPUs.

Three.js version
  • Dev
  • r82
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • Linux
  • Android
  • IOS
Hardware Requirements (graphics card, VR Device, ...)

Adreno 5x0 and I believe Adreno 4x0 GPUs

@bhouston bhouston changed the title from gl_FrontFace not working properly Adreno 530 (Samsung S7, OnePlus 3, Pixel, etc.) to gl_FrontFace not working properly Adreno 530 on double sided materials (Samsung S7, OnePlus 3, Pixel, etc.) Dec 11, 2016
@bhouston bhouston closed this Dec 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment