demo.material 723 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. material colored
  2. {
  3. u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
  4. renderState
  5. {
  6. cullFace = true
  7. depthTest = true
  8. }
  9. technique
  10. {
  11. pass
  12. {
  13. vertexShader = res/shaders/colored.vert
  14. fragmentShader = res/shaders/colored.frag
  15. }
  16. }
  17. }
  18. material lambert2 : colored
  19. {
  20. u_diffuseColor = 0.4, 0.4, 0.4, 1
  21. u_ambientColor = SCENE_AMBIENT_COLOR
  22. u_directionalLightColor[0] = 1, 1, 1
  23. u_directionalLightDirection[0] = 0, -1, 0
  24. u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
  25. technique
  26. {
  27. pass
  28. {
  29. defines = DIRECTIONAL_LIGHT_COUNT 1
  30. }
  31. }
  32. }