pex-gl / pex-renderer

Physically based renderer (PBR) and scene graph for PEX.
https://pex-gl.github.io/pex-renderer/examples/index.html
MIT License
234 stars 16 forks source link

GLTF: Flipped normals for doublesided materials #259

Closed vorg closed 1 year ago

vorg commented 4 years ago

Expected Screenshot 2019-11-13 at 15 20 57

Actual Screenshot 2019-11-13 at 15 21 36

Caused by normal flipping with a gltf geometry that has doubleSided: true

data.normalView *= float(gl_FrontFacing) * 2.0 - 1.0;