playcanvas / playcanvas/engine

Shadow map sizing

Open
#813 8 comments 0 reactions 1 assignee View on GitHub

@mvaligursky is already working on this.

Since May 14, 2021.

area: graphics enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.