bevyengine / bevy

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

Add Stochastic Screen-Space Reflections #14639

Open Bcompartment opened 3 months ago

Bcompartment commented 3 months ago

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

Reflections technique that robustly handles spatially-varying material properties, reproduces specular elongation of microfacet BRDFs.

  1. Sharp and blurry reflections
  2. Contact hardening
  3. Specular elongation

Example from talk: Screenshot

Additional context

Talk by Tomasz Stachowiak at SIGGRAPH 2015 (https://www.ea.com/frostbite/news/stochastic-screen-space-reflections) (https://www.slideshare.net/slideshow/stochastic-screenspace-reflections/51840375)

IceSentry commented 3 months ago

The SSR we currently ship in bevy is based on a ray marching algorithm from the author of that talk (https://gist.github.com/h3r2tic/9c8356bdaefbe80b1a22ae0aaee192db). I don't know exactly which feature is missing if any to be able to compare it to the results of that talk though.

JMS55 commented 3 months ago

AMD has an open source SSR library based on the frostbite presentation https://gpuopen.com/fidelityfx-sssr.

DGriffin91 commented 3 months ago

@IceSentry Bevy's non-pbr sharp only SSR impl only uses h3r2tic's ray marching example for the depth buffer ray traversal and otherwise does not implement SSR as shown in the included example or a pbr implementation like the one OP linked or in sssr, essentially ignoring the BRDF.