PerfGraphBackgroundVS.hlsl 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
  2. // CHECK: lshr
  3. // CHECK: and
  4. // CHECK: and
  5. //
  6. // Copyright (c) Microsoft. All rights reserved.
  7. // This code is licensed under the MIT License (MIT).
  8. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
  9. // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
  10. // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
  11. // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
  12. //
  13. // Developed by Minigraph
  14. //
  15. // Author: Julia Careaga
  16. //
  17. #include "PerfGraphRS.hlsli"
  18. struct VSOutput
  19. {
  20. float4 pos : SV_POSITION;
  21. float3 col : COLOR;
  22. };
  23. cbuffer CB : register(b1)
  24. {
  25. float RecSize;
  26. }
  27. [RootSignature(PerfGraph_RootSig)]
  28. VSOutput main( uint vertexID : SV_VertexID, uint instanceID : SV_InstanceID )
  29. {
  30. //VSOutput Output;
  31. //float2 uv = float2( (vertexID >> 1) & 1, vertexID & 1 );
  32. //float2 Corner = lerp( float2(-1.0f, 1.0f), float2(1.0f, RecSize), uv );
  33. //Corner.y -= 0.45f * instanceID;
  34. //Output.pos = float4(Corner.xy, 1.0,1);
  35. //Output.col = float3(0.0, 0.0, 0.0);
  36. //return Output;
  37. VSOutput Output;
  38. float2 uv = float2( (vertexID >> 1) & 1, vertexID & 1 );
  39. float2 Corner = lerp( float2(-1.0f, 1.0f), float2(1.0f, -1), uv );
  40. Output.pos = float4(Corner.xy, 1.0,1);
  41. Output.col = float3(0.0, 0.0, 0.0);
  42. return Output;
  43. }