25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.lolfx 2.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * LolFx Test Material
  3. */
  4. // Can have lots of different techniques in a single lolfx file,
  5. // especially if they share common shader code.
  6. technique Foo
  7. {
  8. // Multiple passes, with alpha on/off, with various blending methods,
  9. // with depth test disabled...
  10. pass p0
  11. {
  12. texture[0] = null;
  13. texture[1] = null;
  14. texture[2] = null;
  15. cullmode = none; // ccw
  16. lighting = false;
  17. zenable = true; // false
  18. alphablendenable = true; // false
  19. srcblend = src_alpha; // one
  20. destblend = inv_src_alpha;
  21. colorop[0] = select_arg1;
  22. colorarg1[0] = diffuse;
  23. alphaop[0] = select_arg1;
  24. alphaarg1[0] = diffuse;
  25. colorop[1] = disable;
  26. alphaop[1] = disable;
  27. // Ye old way
  28. vertexshader = blah;
  29. geometryshader = blah;
  30. pixelshader = blah;
  31. // Ogre crap
  32. // The D3D11 way, but we must make it work with GLSL too
  33. //SetBlendState(AdditiveBlending, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);
  34. //SetDepthStencilState(DisableDepth, 0);
  35. //SetRasterizerState()
  36. //SetVertexShader
  37. //SetDomainShader
  38. //SetHullShader
  39. //SetGeometryShader
  40. //SetPixelShader
  41. //SetComputeShader /* WTF? */
  42. //SetRenderTargets(RTV0, DSV);
  43. //SetRenderTargets(RTV0, RTV1, DSV);
  44. //...
  45. //SetRenderTargets(RTV0, RTV1, RTV2, RTV3, RTV4, RTV5, RTV6, RTV7, DSV);
  46. }
  47. pass p1
  48. {
  49. // Autres vertex/pixel shaders avec éventuellement des
  50. // dépendances sur le résultat des passes précédentes
  51. vertexshader = something_else;
  52. }
  53. }
  54. /* Defines GLSL shader "Prout" */
  55. #region GLSL.Prout
  56. #version 120
  57. /* Valid with my GLSL compiler */
  58. #pragma lolfx semantic(in_Vertex, POSITION)
  59. #pragma lolfx semantic(in_Normal, NORMAL)
  60. #pragma lolfx semantic(in_Color, COLOR)
  61. attribute vec3 in_Vertex;
  62. attribute vec3 in_Normal;
  63. attribute vec4 in_Color;
  64. void main(void)
  65. {
  66. /* ... */
  67. }
  68. /* Defines GLSL shader "Zob" */
  69. #region GLSL.Zob
  70. void main(void)
  71. {
  72. shit(); fuck(); fuck(); shit();
  73. }
  74. /* Defines HLSL shader "Prout" */
  75. #region HLSL.Prout
  76. void main(void)
  77. {
  78. /* Blah */
  79. }