2026-07-22 18:09:06 +02:00
|
|
|
//SPDX-License-Identifier: MIT
|
|
|
|
|
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
|
|
|
|
|
2026-06-09 22:45:33 +00:00
|
|
|
// RTMultiShadow miss (runs in SHADE). Shadow miss → that light is visible
|
|
|
|
|
// from the surface, so add its pending contribution; up to LIGHT_COUNT of
|
|
|
|
|
// these resolve for the same pixel in one pass (atomic rtAccumulate, #30).
|
|
|
|
|
// Primary miss → near-black night sky so the colored lighting carries the
|
|
|
|
|
// frame.
|
|
|
|
|
fn miss_main(ray: RayDesc, payload: ptr<function, Payload>) {
|
|
|
|
|
if ((*payload).shadowRay == 1u) {
|
|
|
|
|
rtAccumulate((*payload).color);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let t = clamp(ray.direction.y * 0.5 + 0.5, 0.0, 1.0);
|
|
|
|
|
rtAccumulate(mix(vec3<f32>(0.010, 0.012, 0.022),
|
|
|
|
|
vec3<f32>(0.030, 0.040, 0.075), t));
|
|
|
|
|
}
|