gmem-depth-mt.azsl 666 B

12345678910111213141516171819202122232425262728293031323334353637
  1. ShaderResourceGroupSemantic slot1
  2. {
  3. FrequencyId = 1;
  4. };
  5. /* tester */
  6. ShaderResourceGroup SRG : slot1
  7. {
  8. struct CB
  9. {
  10. float4 color;
  11. };
  12. ConstantBuffer<CB> m_uniforms;
  13. [[input_attachment_index(0)]]
  14. SubpassInputDS<float4> m_sub;
  15. float4x4 projection;
  16. };
  17. float4 ReadSourceFromTile(SubpassInputDS spi)
  18. {
  19. return spi.SubpassLoad(int3(0,0,0));
  20. }
  21. // vertex
  22. float4 MainVS(float4 position : POSITION0) : POSITION0
  23. {
  24. return mul(SRG::projection, position );
  25. }
  26. // pixel
  27. float4 MainPS(float2 uv : TEXCOORD0) : SV_Target0
  28. {
  29. // SubpassInput si = SRG::m_sub;
  30. return SRG::m_uniforms.color + ReadSourceFromTile(SRG::m_sub);
  31. }