LineGizmo.bslinc 1.4 KB

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