共用方式為


遺漏著色器

找不到或接受任何光線交集時所叫用的著色器。 這適用於背景或天空底紋。 遺漏著色器可能會使用 CallShaderTraceRay,以排程更多工作。

遺漏著色器必須包含符合提供給 traceRay 的使用者定義結構型別承載參數。

著色器類型屬性

[shader("miss")]

[shader("miss")]
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
}