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
236 stars 16 forks source link

baseColor field missing in PBR data structure #213

Closed vorg closed 5 years ago

vorg commented 5 years ago

Fragment shader error: ERROR: 0:88: 'baseColor' : no such field in structure ERROR: 0:88: 'decode' : no matching overloaded function found ERROR: 0:88: 'rgb' : field selection requires structure or vector on left hand side ERROR: 0:88: '*=' : Invalid operation for structs ERROR: 0:88: 'assign' : cannot convert from 'const mediump float' to 'inout structure'

Happens in pex-renderer@3.0.0-34

vorg commented 5 years ago

Seems to happen after 894c96fa204f318b0aa8fe1f10daf648879cc458 and only if i use instanced colors.

vorg commented 5 years ago

In https://github.com/pex-gl/pex-renderer/commit/894c96fa204f318b0aa8fe1f10daf648879cc458#diff-e649387415c48627c8393b267d0c815aR24

Screenshot 2019-05-25 at 15 20 03

We added baseColor decoding for instanced colors without checking if we are in depth prepass mode like few lines above.