Particle_VS.hlsl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s
  2. // CHECK: loadInput
  3. // CHECK: storeOutput
  4. //--------------------------------------------------------------------------------------
  5. // File: Particle.hlsl
  6. //
  7. // HLSL file containing shader function to render front-facing particles.
  8. //
  9. // Copyright (c) Microsoft Corporation. All rights reserved.
  10. //--------------------------------------------------------------------------------------
  11. #include "shader_include.hlsli"
  12. //--------------------------------------------------------------------------------------
  13. // Internal defines
  14. //--------------------------------------------------------------------------------------
  15. #define FIXED_VERTEX_RADIUS 5.0
  16. //--------------------------------------------------------------------------------------
  17. // Structures
  18. //--------------------------------------------------------------------------------------
  19. struct VS_PARTICLE_INPUT
  20. {
  21. float3 WSPos : POSITION;
  22. };
  23. struct GS_PARTICLE_INPUT
  24. {
  25. float4 WSPos : POSITION;
  26. };
  27. struct PS_PARTICLE_INPUT
  28. {
  29. float4 Pos : SV_POSITION;
  30. float2 Tex : TEXCOORD0;
  31. };
  32. //--------------------------------------------------------------------------------------
  33. // Vertex Shader to GS
  34. //--------------------------------------------------------------------------------------
  35. GS_PARTICLE_INPUT main( VS_PARTICLE_INPUT input )
  36. {
  37. GS_PARTICLE_INPUT output = (GS_PARTICLE_INPUT)0;
  38. // Pass world space position to GS
  39. output.WSPos = float4( input.WSPos, 1.0 );
  40. return output;
  41. }