sample.material 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. material colored
  2. {
  3. technique
  4. {
  5. pass
  6. {
  7. // shaders
  8. vertexShader = res/shaders/colored.vert
  9. fragmentShader = res/shaders/colored.frag
  10. defines = DIRECTIONAL_LIGHT_COUNT 1
  11. // uniforms
  12. u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
  13. u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
  14. u_ambientColor = SCENE_AMBIENT_COLOR
  15. u_directionalLightColor[0] = 0.75, 0.75, 0.75
  16. u_directionalLightDirection[0] = 0, 0, -1
  17. // render state
  18. renderState
  19. {
  20. cullFace = true
  21. depthTest = true
  22. }
  23. }
  24. }
  25. }
  26. material cube : colored
  27. {
  28. technique
  29. {
  30. pass
  31. {
  32. u_diffuseColor = 0.1, .6, 0.1, 1
  33. }
  34. }
  35. }
  36. material blue : colored
  37. {
  38. technique
  39. {
  40. pass
  41. {
  42. u_diffuseColor = 0, 0, 1, 1
  43. }
  44. }
  45. }
  46. material red : colored
  47. {
  48. technique
  49. {
  50. pass
  51. {
  52. u_diffuseColor = 1, 0, 0, 1
  53. }
  54. }
  55. }
  56. material cylinder : colored
  57. {
  58. technique
  59. {
  60. pass
  61. {
  62. u_diffuseColor = 0.38, 0.63, 1, 1
  63. }
  64. }
  65. }
  66. material torus : colored
  67. {
  68. technique
  69. {
  70. pass
  71. {
  72. u_diffuseColor = 1, 0.5, 0.0, 1
  73. }
  74. }
  75. }
  76. material sphere : colored
  77. {
  78. technique
  79. {
  80. pass
  81. {
  82. u_diffuseColor = 0.7, 0.7, 0.7, 1
  83. }
  84. }
  85. }
  86. material cone : colored
  87. {
  88. technique
  89. {
  90. pass
  91. {
  92. u_diffuseColor = 0.5, 0.25, 0.5, 1
  93. }
  94. }
  95. }