The shadows' textures cannot be prevented from generating
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.13.2
## What you did
Set the shadows_enabled property of PointLight to false
## What went wrong
The shadow texture of PointLight still occupy video memory. I haven't even added DirectionalLight, yet its shadow texture are also taking up video memory.
If I set the size of PointLightShadowMap to 0, the program crashes. Therefore, I have to set it to 1 to reduce memory usage.
Contributor guide
Research direction
Start by tracing PointLight shadow handling and PointLightShadowMap allocation in the rendering code, reproducing the case with shadows_enabled set to false. Verify the behavior for both disabled point-light shadows and a shadow-map size of 0; done means unused shadow textures no longer consume video memory and size 0 does not crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100