Skip to content

Proof of concept for a translucency / fake subsurface-scattering shader, using multiple passes with different blend ops to calculate thickness without reading back the depth buffer. (Unity)

Notifications You must be signed in to change notification settings

Philipp-Seifried/MultipassTranslucency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

project screenshot

A proof of concept for a translucency / fake subsurface-scattering shader, based on multiple passes.

This technique stores view space z-coordinates in the framebuffer's alpha channel. It performs several passes with different blend operations to mask out light from backfaces based on the difference in depth between front- and backfaces. The shader requires HDR rendering (for a 16 bit alpha channel) and uses a total of 5 drawcalls, but it works without thickness maps, wrap lighting or reading from the depth buffer, and it can handle animated geometry. Only tested on Windows/DirectX.

The sample project uses test models downloaded from Morgan McGuire's Computer Graphics Archive https://casual-effects.com/data The proof of concept shader itself is MIT-licensed (license placed at the top of the shader file).

overview

About

Proof of concept for a translucency / fake subsurface-scattering shader, using multiple passes with different blend ops to calculate thickness without reading back the depth buffer. (Unity)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published