Selection.bsl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. Parameters =
  2. {
  3. mat4x4 matWorldViewProj;
  4. float4 selColor;
  5. };
  6. Technique =
  7. {
  8. Language = "HLSL11";
  9. Pass =
  10. {
  11. Fill = WIRE;
  12. DepthBias = 0.00001f;
  13. Target =
  14. {
  15. Blend = true;
  16. Color = { SRCA, SRCIA, ADD };
  17. };
  18. Vertex =
  19. {
  20. float4x4 matWorldViewProj;
  21. void main(
  22. in float3 inPos : POSITION,
  23. out float4 oPosition : SV_Position)
  24. {
  25. oPosition = mul(matWorldViewProj, float4(inPos.xyz, 1));
  26. }
  27. };
  28. Fragment =
  29. {
  30. float4 selColor;
  31. float4 main(in float4 inPos : SV_Position) : SV_Target
  32. {
  33. return selColor;
  34. }
  35. };
  36. };
  37. };
  38. Technique =
  39. {
  40. Language = "HLSL9";
  41. Pass =
  42. {
  43. Fill = WIRE;
  44. DepthBias = 0.00001f;
  45. Target =
  46. {
  47. Blend = true;
  48. Color = { SRCA, SRCIA, ADD };
  49. };
  50. Vertex =
  51. {
  52. float4x4 matWorldViewProj;
  53. void main(
  54. in float3 inPos : POSITION,
  55. out float4 oPosition : POSITION)
  56. {
  57. oPosition = mul(matWorldViewProj, float4(inPos.xyz, 1));
  58. }
  59. };
  60. Fragment =
  61. {
  62. float4 selColor;
  63. float4 main() : COLOR0
  64. {
  65. return selColor;
  66. }
  67. };
  68. };
  69. };
  70. Technique =
  71. {
  72. Language = "GLSL";
  73. Pass =
  74. {
  75. Fill = WIRE;
  76. DepthBias = 0.00001f;
  77. Target =
  78. {
  79. Blend = true;
  80. Color = { SRCA, SRCIA, ADD };
  81. };
  82. Vertex =
  83. {
  84. uniform mat4 matWorldViewProj;
  85. in vec3 bs_position;
  86. out gl_PerVertex
  87. {
  88. vec4 gl_Position;
  89. };
  90. void main()
  91. {
  92. gl_Position = matWorldViewProj * vec4(bs_position.xyz, 1);
  93. }
  94. };
  95. Fragment =
  96. {
  97. uniform vec4 selColor;
  98. out vec4 fragColor;
  99. void main()
  100. {
  101. fragColor = selColor;
  102. }
  103. };
  104. };
  105. };