Common.hlsl 524 B

1234567891011121314151617
  1. // Hit information, aka ray payload
  2. // This sample only carries a shading color and hit distance.
  3. // Note that the payload should be kept as small as possible,
  4. // and that its size must be declared in the corresponding
  5. // D3D12_RAYTRACING_SHADER_CONFIG pipeline subobjet.
  6. struct [raypayload] HitInfo
  7. {
  8. float4 colorAndDistance : write(caller, closesthit, miss) : read(caller);
  9. };
  10. // Attributes output by the raytracing when hitting a surface,
  11. // here the barycentric coordinates
  12. struct Attributes
  13. {
  14. float2 bary;
  15. };