bevyengine / bevyengine/bevy

Automatic shadow biasing

Open
#16,075 1 comment 0 reactions 0 assignees View on GitHub
A-Rendering C-Feature D-Modest S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Shadow acne is an artifact that occurs when sampling the shadow map. The shadow map surface you intend to sample was discretized into the shadow map, which might not perfectly match the sample position.

The solution is to bias the sampling position away from the surface a little.

## What solution would you like?

An automatic algorithm to compute a good shadowing bias.

State of the art is "Oriented Depth Bias" from FFXVI http://www.jp.square-enix.com/tech/library/pdf/2023_FFXVIShadowTechPaper.pdf#page=28.

## What alternative(s) have you considered?

A constant shadow bias is already supported by our lighting system. It's hard to find a good value for this that doesn't result in objects appearing to disconnect from their shadows.

## Additional context

An older method called "Receiver Plane Depth Bias" was tried in https://github.com/bevyengine/bevy/pull/10188.

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked Oriented Depth Bias paper, then inspect the existing constant shadow-bias implementation and the approach discussed in pull request #10188. Define the expected automatic-bias behavior and validate it against shadow acne and shadow-disconnection cases before determining the relevant rendering tests or examples to update.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.