Files
UnrealEngine/Engine/Shaders/Private/RayTracing/RayTracingMaterialDefaultHitShaders.usf
2025-05-18 13:04:45 +08:00

36 lines
952 B
HLSL

// Copyright Epic Games, Inc. All Rights Reserved.
#include "../Common.ush"
#include "RayTracingCommon.ush"
#if IS_PAYLOAD_ENABLED(RT_PAYLOAD_TYPE_RAYTRACING_MATERIAL)
RAY_TRACING_ENTRY_CLOSEST_HIT(OpaqueShadowCHS,
FPackedMaterialClosestHitPayload, PackedPayload,
FRayTracingIntersectionAttributes, Attributes)
{
PackedPayload.HitT = RayTCurrent();
}
RAY_TRACING_ENTRY_CLOSEST_HIT(HiddenMaterialCHS,
FPackedMaterialClosestHitPayload, PackedPayload,
FRayTracingIntersectionAttributes, Attributes)
{
}
RAY_TRACING_ENTRY_ANY_HIT(HiddenMaterialAHS,
FPackedMaterialClosestHitPayload, PackedPayload,
FRayTracingIntersectionAttributes, Attributes)
{
IgnoreHit();
}
#endif
#if IS_PAYLOAD_ENABLED(RT_PAYLOAD_TYPE_DECALS)
RAY_TRACING_ENTRY_CALLABLE(DefaultCallableShader,
FDecalShaderPayload, Params)
{
// This shader serves only has a placeholder in RTPSO
// If RTPSO doesn't include a required shader, a NULL SBT entry should be used.
}
#endif