Skip to content

Commit 773457b

Browse files
authored
HeightBasedTerrain.j3md: removed incorrect 'Tecnique' block.
+ format code
1 parent 06f178d commit 773457b

File tree

1 file changed

+36
-37
lines changed

1 file changed

+36
-37
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
11
MaterialDef Terrain {
22

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)
2713

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+
}
3128

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
4037
}
41-
}
4238

43-
Technique {
39+
Defines {
40+
BOUND_DRAW_BUFFER: BoundDrawBuffer
41+
}
4442
}
43+
4544
}

0 commit comments

Comments
 (0)