SimpleBlocksClosestHit.hlsl 595 B

123456789101112131415161718192021
  1. #include "Common.hlsl"
  2. Texture2D<float4> textures[] : register(t0, space1);
  3. SamplerState gSampler : register(s0, space0);
  4. struct VertexData
  5. {
  6. float2 texcoord;
  7. float3 normal;
  8. };
  9. StructuredBuffer<int> textureIdBuffer : register(t1, space2);
  10. StructuredBuffer<int> indexBuffer : register(t1, space3);
  11. StructuredBuffer<VertexData> vertexData : register(t1, space4);
  12. StructuredBuffer<int> indexOffsetBuffer : register(t1, space5);
  13. [shader("closesthit")]
  14. void SimpleBlocksClosestHit(inout HitInfo payload, SimpleBlocksAttributes attrib)
  15. {
  16. // TODO: reflection rays and shadow rays ...
  17. }