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

Allow shadow map size customisation #340

Closed dmnsgn closed 1 year ago

dmnsgn commented 1 year ago

Problem: dimensions are hardcoded in the pass descriptor and we don't have options to change them

https://github.com/pex-gl/pex-renderer/blob/ae6f60d7193cfbc1e7c9abc0e5d8427f30c629c8/systems/renderer/passes.js#L50-L58

when they are used later on

https://github.com/pex-gl/pex-renderer/blob/ae6f60d7193cfbc1e7c9abc0e5d8427f30c629c8/systems/render-pipeline.js#L213

One solution is to add a shadowMapSize property to light components to be used here:

https://github.com/pex-gl/pex-renderer/blob/ae6f60d7193cfbc1e7c9abc0e5d8427f30c629c8/systems/render-pipeline.js#L196-L198


NB: maybe this also question all pass descriptors customisation

dmnsgn commented 1 year ago

Fixed in 90a39cb5b751e67eb8390aacff0ccb2bbcaa81c8