Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1016 Bytes

miss-shader.md

File metadata and controls

53 lines (35 loc) · 1016 Bytes
description ms.assetid title ms.topic ms.date topic_type api_name api_type
A shader that is invoked when no ray intersections are found or accepted.
Miss Shader
reference
05/31/2018
APIRef
kbSyntax
RAY_FLAG
NA

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
}