Mesh thickness prepass textute
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
Information about distance to mesh is often used (depth texture), but what about distance through mesh? Local thickness is essential for realistic subsurface shaders (skin, foliage, fruits and more) , volumetric an transmittance rendering. It could be used in post-fx.
Examples:



## What solution would you like?
Per-camera texture that hold local distance, that ray passes through mesh, so enter and exit points can be computed using view matrix.

## More information:
1. GDC 2011 "Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look"
http://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/
2. Barre-Brisebois, Colin and Bouchard, Marc. "Real-Time Approximation of Light Transport in
Translucent Homogenous Media", GPU Pro 2, Wolfgang Engel, Ed. Charles River Media, 2011.
Contributor guide
Assessment
This issue has not been assessed yet.