InputAssemblyDraw.azsl 804 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. ShaderResourceGroupSemantic SRG_Frequency0
  9. {
  10. FrequencyId = 0;
  11. };
  12. ShaderResourceGroup DrawSRG : SRG_Frequency0
  13. {
  14. row_major float4x4 m_matrix;
  15. float4 m_color;
  16. };
  17. struct VSInput
  18. {
  19. float4 m_position : POSITION;
  20. };
  21. struct VSOutput
  22. {
  23. float4 m_position : SV_Position;
  24. };
  25. VSOutput MainVS(VSInput vsInput)
  26. {
  27. VSOutput OUT;
  28. OUT.m_position = mul(DrawSRG::m_matrix, vsInput.m_position);
  29. return OUT;
  30. }
  31. struct PSOutput
  32. {
  33. float4 m_color : SV_Target0;
  34. };
  35. PSOutput MainPS(VSOutput psInput)
  36. {
  37. PSOutput OUT;
  38. OUT.m_color = DrawSRG::m_color;
  39. return OUT;
  40. }