Optional ReadonlyanyReadonlyhitThe provider defines fn traceHitMaterial(hit: Hit) -> HitMaterial. Otherwise the pass supplies a grey default.
ReadonlyhitHit.normal is the world-space geometric normal (unit, not necessarily facing the ray). Otherwise it is 0.
Optional ReadonlyhitThe provider defines fn traceHitShade(hit: Hit, origin: vec3f, dir: vec3f, u: vec3f) -> vec3f: the radiance
leaving the hit toward origin, emission plus one light sample of the provider's own lights with its shadow
ray (@pmndrs/raytracer's rtShade; u = three uniform numbers). raytracerHitShading needs it. Default false.
Optional ReadonlyhitThe provider defines fn traceHitSpecular(hit: Hit) -> HitSpecular (W41, D3510). Otherwise the
pass supplies a no-specular default, so hits shade as before (diffuse + emissive only).
Optional ReadonlyshadingThe provider defines fn traceHitShadingNormal(hit: Hit) -> vec3f: the interpolated vertex
normal at the hit in world space (any length, any side; vec3f(0) where the mesh has no normals).
The pass shades with it, turned to the side of the ray-facing geometric normal. Otherwise the
pass uses Hit.normal (flat shading, D1700). Default false.
The provider defines
fn traceAny(origin: vec3f, dir: vec3f, tMax: f32) -> bool(an any-hit / occlusion walk that may stop at the first triangle it finds). Otherwise the pass supplies one fromtraceFirstHit. Default false.