|
1 | 1 | MaterialDef Terrain { |
2 | 2 |
|
3 | | - // Parameters to material: |
4 | | - // regionXColorMap: X = 1..4 the texture that should be applied to state X |
5 | | - // regionX: a Vector3f containing the following information: |
6 | | - // regionX.x: the start height of the region |
7 | | - // regionX.y: the end height of the region |
8 | | - // regionX.z: the texture scale for the region |
9 | | - // it might not be the most elegant way for storing these 3 values, but it packs the data nicely :) |
10 | | - // slopeColorMap: the texture to be used for cliffs, and steep mountain sites |
11 | | - // slopeTileFactor: the texture scale for slopes |
12 | | - // terrainSize: the total size of the terrain (used for scaling the texture) |
13 | | - MaterialParameters { |
14 | | - Int BoundDrawBuffer |
15 | | - Texture2D region1ColorMap |
16 | | - Texture2D region2ColorMap |
17 | | - Texture2D region3ColorMap |
18 | | - Texture2D region4ColorMap |
19 | | - Texture2D slopeColorMap |
20 | | - Float slopeTileFactor |
21 | | - Float terrainSize |
22 | | - Vector3 region1 |
23 | | - Vector3 region2 |
24 | | - Vector3 region3 |
25 | | - Vector3 region4 |
26 | | - } |
| 3 | + // Parameters to material: |
| 4 | + // regionXColorMap: X = 1..4 the texture that should be applied to state X |
| 5 | + // regionX: a Vector3f containing the following information: |
| 6 | + // regionX.x: the start height of the region |
| 7 | + // regionX.y: the end height of the region |
| 8 | + // regionX.z: the texture scale for the region |
| 9 | + // it might not be the most elegant way for storing these 3 values, but it packs the data nicely :) |
| 10 | + // slopeColorMap: the texture to be used for cliffs, and steep mountain sites |
| 11 | + // slopeTileFactor: the texture scale for slopes |
| 12 | + // terrainSize: the total size of the terrain (used for scaling the texture) |
27 | 13 |
|
28 | | - Technique { |
29 | | - VertexShader GLSL300 GLSL150 GLSL100: Common/MatDefs/Terrain/HeightBasedTerrain.vert |
30 | | - FragmentShader GLSL300 GLSL150 GLSL100: Common/MatDefs/Terrain/HeightBasedTerrain.frag |
| 14 | + MaterialParameters { |
| 15 | + Int BoundDrawBuffer |
| 16 | + Texture2D region1ColorMap |
| 17 | + Texture2D region2ColorMap |
| 18 | + Texture2D region3ColorMap |
| 19 | + Texture2D region4ColorMap |
| 20 | + Texture2D slopeColorMap |
| 21 | + Float slopeTileFactor |
| 22 | + Float terrainSize |
| 23 | + Vector3 region1 |
| 24 | + Vector3 region2 |
| 25 | + Vector3 region3 |
| 26 | + Vector3 region4 |
| 27 | + } |
31 | 28 |
|
32 | | - WorldParameters { |
33 | | - WorldViewProjectionMatrix |
34 | | - WorldMatrix |
35 | | - NormalMatrix |
36 | | - } |
37 | | - |
38 | | - Defines { |
39 | | - BOUND_DRAW_BUFFER: BoundDrawBuffer |
| 29 | + Technique { |
| 30 | + VertexShader GLSL300 GLSL150 GLSL100: Common/MatDefs/Terrain/HeightBasedTerrain.vert |
| 31 | + FragmentShader GLSL300 GLSL150 GLSL100: Common/MatDefs/Terrain/HeightBasedTerrain.frag |
| 32 | + |
| 33 | + WorldParameters { |
| 34 | + WorldViewProjectionMatrix |
| 35 | + WorldMatrix |
| 36 | + NormalMatrix |
40 | 37 | } |
41 | | - } |
42 | 38 |
|
43 | | - Technique { |
| 39 | + Defines { |
| 40 | + BOUND_DRAW_BUFFER: BoundDrawBuffer |
| 41 | + } |
44 | 42 | } |
| 43 | + |
45 | 44 | } |
0 commit comments