PickingCull.bslinc 604 B

12345678910111213141516171819202122232425262728293031323334353637
  1. mixin PickingCull
  2. {
  3. raster
  4. {
  5. scissor = true;
  6. };
  7. code
  8. {
  9. cbuffer Uniforms
  10. {
  11. float4x4 gMatWorldViewProj;
  12. float4 gColorIndex;
  13. float gAlphaCutoff;
  14. }
  15. void vsmain(
  16. in float3 inPos : POSITION,
  17. in float3 inNorm : NORMAL,
  18. out float4 oPosition : SV_Position,
  19. out float4 oNorm : NORMAL)
  20. {
  21. oPosition = mul(gMatWorldViewProj, float4(inPos.xyz, 1));
  22. oNorm = float4(inNorm, 0);
  23. }
  24. float4 fsmain(
  25. in float4 inPos : SV_Position,
  26. in float4 inNorm : NORMAL,
  27. out float4 oNorm : SV_Target1
  28. ) : SV_Target0
  29. {
  30. oNorm = inNorm;
  31. return gColorIndex;
  32. }
  33. };
  34. };