UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RayTracingBasicShaders.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7#if RHI_RAYTRACING
8
9#include "RayTracingPayloadType.h"
10
11// C++ counter-part of FBasicRayData declared in RayTracingCommon.ush
13{
14 float Origin[3];
16 float Direction[3];
17 float TFar;
18};
19
20// C++ counter-part of FIntersectionPayload declared in RayTracingCommon.ush
22{
23 float HitT; // Distance from ray origin to the intersection point in the ray direction. Negative on miss.
24 uint32 PrimitiveIndex; // Index of the primitive within the geometry inside the bottom-level acceleration structure instance. Undefined on miss.
25 uint32 InstanceIndex; // Index of the current instance in the top-level structure. Undefined on miss.
26 float Barycentrics[2]; // Primitive barycentric coordinates of the intersection point. Undefined on miss.
27};
28
30{
33
39
40 static ERayTracingPayloadType GetRayTracingPayloadType(const int32 PermutationId)
41 {
42 return ERayTracingPayloadType::Default;
43 }
44};
45
47{
50
56
57 static ERayTracingPayloadType GetRayTracingPayloadType(const int32 PermutationId)
58 {
59 return ERayTracingPayloadType::Default;
60 }
61};
62
64{
66public:
67
68 FBasicIntersectionMainCHS() = default;
69 FBasicIntersectionMainCHS(const ShaderMetaType::CompiledShaderInitializerType& Initializer)
71 {}
72
73 static ERayTracingPayloadType GetRayTracingPayloadType(const int32 PermutationId)
74 {
75 return ERayTracingPayloadType::Default;
76 }
77};
78
85
91
92#endif // RHI_RAYTRACING
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_GLOBAL_SHADER(ShaderClass)
Definition GlobalShader.h:408
#define SHADER_PARAMETER_SRV(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1720
#define BEGIN_SHADER_PARAMETER_STRUCT(StructTypeName, DllStorage)
Definition ShaderParameterMacros.h:1482
#define END_SHADER_PARAMETER_STRUCT()
Definition ShaderParameterMacros.h:1485
#define SHADER_PARAMETER_UAV(ShaderType, MemberName)
Definition ShaderParameterMacros.h:1731
#define SHADER_USE_ROOT_PARAMETER_STRUCT(ShaderClass, ShaderParentClass)
Definition ShaderParameterStruct.h:79
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition RHICommandList.h:3819
Definition RHIResources.h:3729
Definition RHIResources.h:3304
Definition RHIResources.h:3294