bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
35.92k stars 3.55k forks source link

Percentage Closer Filtering for shadows #3628

Closed superdump closed 6 months ago

superdump commented 2 years ago

Description

Background and Reference Material

Solution

Next Steps

Suyashtnt commented 2 years ago

Any updates to this? The last commit in that branch was nearly a year ago

JMS55 commented 1 year ago

For point lights, I found this: https://kosmonautblog.wordpress.com/2017/03/25/shadow-filtering-for-pointlights/

superdump commented 1 year ago

@JMS55 yeah. I've been thinking that we should probably move to a shadow atlas and only render/update the tiles we need (each tile could be a directional light shadow map cascade, a spot light shadow map, or one face of a point light shadow 'cubemap'). Then we could prioritise which shadow maps to update (e.g. those with some lighting/occluder change that are closest to the camera?) and potentially support shadow mapping for many more spot/point light sources.

JMS55 commented 1 year ago

A new biasing technique: "Oriented Depth Bias" section 4.2 http://www.jp.square-enix.com/tech/library/pdf/2023_FFXVIShadowTechPaper.pdf

superdump commented 11 months ago

The Witness (Castaño 13) and Call of Duty: Advanced Warfare (Jimenez 14) methods were implemented for directional and spot lights in Bevy 0.12. #10188 is still needed, and then also PCF for point light shadow maps.