bevyengine / bevyengine/bevy

Shadow visibility term is non-perceptual.

Open
#22,608 0 comments 1 reaction 0 assignees View on GitHub
A-Rendering C-Bug D-Modest M-Deliberate-Rendering-Change
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy 0.18

Bevy just uses the shadow visibility term directly. The resulting gradient is not perceptually linear so it ends up looking blocky. Should use something like [hardenedKernel](https://github.com/google/filament/blob/1f6a67b2a2798acdfbf14ea9aba3686dd5530b2a/shaders/src/surface_shadowing.fs#L118) from Filament.

Current bevy 0.18/main. Raw visibility term.
Image

[hardenedKernel](https://github.com/google/filament/blob/1f6a67b2a2798acdfbf14ea9aba3686dd5530b2a/shaders/src/surface_shadowing.fs#L118)
Image

pow(visibility, 2.2)
Image

Contributor guide

Open the contributing guide

Research direction

Start at Bevy's shadow visibility term in the rendering code; the issue names no file or test. Compare the current raw visibility output with Filament's hardenedKernel and the pow(visibility, 2.2) example, then validate that the resulting gradient is perceptually smoother without regressing shadow behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.