playcanvas / playcanvas/engine
Shadow map sizing
@mvaligursky is already working on this.
Since May 14, 2021.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
Hello guys,
While playing with shadows in Play Canvas I ran into quite an unpleasant issue with my scene: basically, the scene is quite big (in terms how much world units the camera sees), but the bounding box of all shadow casters is quite small – imagine an exhibition hall with an item in the center of it – all the surroundings are basically empty / not affected by shadows. However, the shadow map always gets rendered so that the whole visible area (limited by shadow distance) gets into shadow camera's view.
Just a random thought: would it make sense to try adjusting shadow camera frustrum so that it captures the volume = MIN(visible scene BB, shadow casters BB)? I am looking into trying to play with it but a bit afraid that I am missing something crucial and will just waste the time before running into a stone wall – or it's actually worth trying?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.