Log inGet started
Package

fluid_media_trace.rasterShader

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

fluid_media_trace (raster shader)

Lays a screen-space fluid surface's trace in the media trace (@scene.media, @scene.mediaSurface) for the fluidSurface render feature: one triangle over the whole view, whose fragments lay the surface where its resolved data (fs_data) says it stands in front of the opaque scene, as the composite shows it, as a see-through surface covering the pixel, at its distance from the camera and with the normal its smoothed depth slopes to. A pixel the surface does not reach, or where an opaque surface stands in front of it, draws nothing.

cam is the drawn camera (@frame.camera) and scene_depth the scene's depth, whose size the trace is drawn at. The pass writes @scene.media at @location(0) and @scene.mediaSurface at @location(1), both "premultiplied", and runs only on a view that keeps the trace.