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

Default skybox sunPosition #352

Closed vorg closed 8 months ago

vorg commented 8 months ago

Are we skipping default sunPosition in case we have hdr and never need it? creating blank components.skybox() crashes renderer ATM ypeError: Spread syntax requires ...iterable not be null or undefined and requires at least components.skybox({ sunPosition: [2, 2, 2] }),

dmnsgn commented 8 months ago

Since sunPosition and envMap are mutually exclusive, they are not added when creating the component: we don't want sky texture/pass to be created if we then add envMap. Added checks.