WireGizmo.bsl 1.4 KB

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