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

Assimilate empty strings "" as falsy when when checking flags of type "value" #387

Closed dmnsgn closed 1 month ago

dmnsgn commented 1 month ago

Setting camera toneMap to empty string will actually still #define TONEMAP with an empty space.

Should probably not be as early as this line (to allow default and fallback for others flags):

https://github.com/pex-gl/pex-renderer/blob/789e0a4db3b8506e69d1d38ff2a1f1b6dd3dd4ad/pipeline-cache.js#L69

But added when checking type:

https://github.com/pex-gl/pex-renderer/blob/789e0a4db3b8506e69d1d38ff2a1f1b6dd3dd4ad/pipeline-cache.js#L77-L80