Builtin Library
- ..
- README.md703 B
- bindings.yaml387 B
- shader.wgsl5.5 KB
README.md
contact_shadows_sun
Marches a short ray per pixel from the surface toward the sun through this frame's depth, at the depth seam before anything shades, and writes the share of the sun's light the ray finds taken: strength times how blocked it is, 0 where the surface is turned from the sun. The surface's normal comes from the depth itself. The sun is the scene's (@frame.light) while contact_params[2].z is 1, and contact_params[0].xyz, the direction its light travels, otherwise.
Bindings
| name | kind |
|---|---|
scene_depth | texture_depth |
frame_cam | buffer |
scene_light | buffer |
contact_params | buffer |
contact_out | storage2d (rgba8) |