/*
 * Copyright (c) Contributors to the Open 3D Engine Project.
 * For complete copyright and license terms please see the LICENSE at the root of this distribution.
 *
 * SPDX-License-Identifier: Apache-2.0 OR MIT
 *
 */

#include <Atom/Features/SrgSemantics.azsli>
#include "RayTracingCommon.azsli"

// hit shader that lerps between two colors
[shader("closesthit")] 
void ClosestHitSolidShader(inout RayPayload payload, BuiltInTriangleIntersectionAttributes attr) 
{
    payload.color = smoothstep(RayTracingGlobalSrg::m_hitSolidData[InstanceID()].m_color1,
                               RayTracingGlobalSrg::m_hitSolidData[InstanceID()].m_color2,
                               RayTracingGlobalSrg::m_hitSolidData[InstanceID()].m_lerp);
}