D3D12_PixelShader_Colors.hlsl 462 B

12345678910111213141516171819
  1. struct PixelShaderInput
  2. {
  3. float4 pos : SV_POSITION;
  4. float2 tex : TEXCOORD0;
  5. float4 color : COLOR0;
  6. };
  7. #define ColorRS \
  8. "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \
  9. "DENY_DOMAIN_SHADER_ROOT_ACCESS |" \
  10. "DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \
  11. "DENY_HULL_SHADER_ROOT_ACCESS )," \
  12. "RootConstants(num32BitConstants=32, b0)"
  13. [RootSignature(ColorRS)]
  14. float4 main(PixelShaderInput input) : SV_TARGET0
  15. {
  16. return input.color;
  17. }