Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit0a13e47b57

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

namekind
scene_depthtexture_depth
frame_cambuffer
scene_lightbuffer
contact_paramsbuffer
contact_outstorage2d (rgba8)