watersample.material 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. material ground
  2. {
  3. technique
  4. {
  5. pass
  6. {
  7. vertexShader = res/shaders/textured.vert
  8. fragmentShader = res/shaders/textured.frag
  9. defines = DIRECTIONAL_LIGHT_COUNT 1;CLIP_PLANE
  10. u_worldMatrix = WORLD_MATRIX
  11. u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
  12. u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
  13. u_ambientColor = SCENE_AMBIENT_COLOR
  14. u_directionalLightColor[0] = 1, 1, 1
  15. sampler u_diffuseTexture
  16. {
  17. mipmap = true
  18. wrapS = REPEAT
  19. wrapT = REPEAT
  20. minFilter = LINEAR_MIPMAP_LINEAR
  21. magFilter = LINEAR
  22. path = res/common/water/water_sample.png
  23. }
  24. renderState
  25. {
  26. cullFace = true
  27. depthTest = true
  28. }
  29. }
  30. }
  31. }
  32. material water
  33. {
  34. technique
  35. {
  36. pass
  37. {
  38. vertexShader = res/common/water/watersample.vert
  39. fragmentShader = res/common/water/watersample.frag
  40. u_worldMatrix = WORLD_MATRIX
  41. u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
  42. u_cameraPosition = CAMERA_WORLD_POSITION
  43. sampler u_normalMap
  44. {
  45. mipmap = true
  46. wrapS = REPEAT
  47. wrapT = REPEAT
  48. minFilter = LINEAR_MIPMAP_LINEAR
  49. magFilter = LINEAR
  50. path = res/common/water/water_normal.png
  51. }
  52. renderState
  53. {
  54. cullFace = true
  55. depthTest = true
  56. }
  57. }
  58. }
  59. }