CallShader¶
Description¶
Executes a callable shader with the specified payload.
Signature¶
void CallShader<Payload>( uint shaderIndex, inout Payload payload);
Generic Parameters¶
Payload¶
Parameters¶
shaderIndex : uint¶
Index of the callable shader to execute
payload : Payload¶
Data structure to pass to and receive from the callable shader
Remarks¶
Used to implement dynamic shader calls during ray tracing
Availability and Requirements¶
Defined for the following targets:
hlsl¶
Available in stages: closesthit, raygen, miss, callable.
glsl¶
Available in stages: closesthit, raygen, miss, callable.
spirv¶
Available in stages: closesthit, raygen, miss, callable.
Requires capability: spvRayTracingKHR.