Miss Shader
A shader that is invoked when no ray intersections are found or accepted. This is useful for background or sky shading. The miss shader may use CallShader and TraceRay to schedule more work.
The miss shader must include a user-defined structure typed payload parameter matching the one supplied to TraceRay.
Shader Type attribute
[shader("miss")]
Example
[shader("anyhit")]
void miss_main(inout MyPayload payload)
{
// Use ray system values to compute contributions of background, sky, etc...
// Combine contributions into ray payload
CallShader( ... ); // if desired
TraceRay( ... ); // if desired
// this ray query is now complete
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for