2026-07-22 18:09:06 +02:00
|
|
|
//SPDX-License-Identifier: MIT
|
|
|
|
|
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
|
|
|
|
|
2026-06-18 19:35:54 +00:00
|
|
|
#version 460
|
|
|
|
|
#extension GL_EXT_ray_tracing : enable
|
|
|
|
|
|
|
|
|
|
// Benchmark closest-hit: shade from the hit's barycentric coordinates.
|
|
|
|
|
// SponzaBench deliberately avoids the descriptor-heap texture sample the
|
|
|
|
|
// interactive Sponza example uses — the point here is to measure the
|
|
|
|
|
// ray-tracing traversal + frame-loop cost, not texturing, and a
|
|
|
|
|
// texture-free hit keeps the host setup portable across library
|
|
|
|
|
// revisions (issue #155).
|
|
|
|
|
hitAttributeEXT vec2 hitAttrs;
|
|
|
|
|
layout(location = 0) rayPayloadInEXT vec3 hitValue;
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
vec3 bary = vec3(1.0 - hitAttrs.x - hitAttrs.y, hitAttrs.x, hitAttrs.y);
|
|
|
|
|
hitValue = bary;
|
|
|
|
|
}
|