Create effects for shrub type landmass with no or little height. Add a new shrub texture contributed by Yves
This commit is contained in:
parent
65007fd4b3
commit
52c46e87c9
4 changed files with 44 additions and 20 deletions
8
Effects/landmass-nowood.eff
Normal file
8
Effects/landmass-nowood.eff
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PropertyList>
|
||||||
|
<name>Effects/landmass-nowood</name>
|
||||||
|
<inherits-from>Effects/landmass</inherits-from>
|
||||||
|
<parameters>
|
||||||
|
<canopy-height type="float">0.0</canopy-height>
|
||||||
|
</parameters>
|
||||||
|
</PropertyList>
|
15
Effects/landmass-scrub.eff
Normal file
15
Effects/landmass-scrub.eff
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PropertyList>
|
||||||
|
<name>Effects/landmass-scrub</name>
|
||||||
|
<inherits-from>Effects/landmass</inherits-from>
|
||||||
|
<parameters>
|
||||||
|
<texture n="2">
|
||||||
|
<image>Textures.high/Terrain/shrubcover-relief.png</image>
|
||||||
|
<filter>linear-mipmap-linear</filter>
|
||||||
|
<wrap-s>repeat</wrap-s>
|
||||||
|
<wrap-t>repeat</wrap-t>
|
||||||
|
<internal-format>normalized</internal-format>
|
||||||
|
</texture>
|
||||||
|
<canopy-height type="float">1.0</canopy-height>
|
||||||
|
</parameters>
|
||||||
|
</PropertyList>
|
|
@ -54,6 +54,7 @@ void createVertex(int i, int j, float offset, float s)
|
||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
|
if (canopy_height > 0.01) {
|
||||||
createVertex(0, 1, canopy_height, 0.0);
|
createVertex(0, 1, canopy_height, 0.0);
|
||||||
createVertex(0, 1, 0.0, 0.0);
|
createVertex(0, 1, 0.0, 0.0);
|
||||||
createVertex(1, 0, canopy_height, 0.0);
|
createVertex(1, 0, canopy_height, 0.0);
|
||||||
|
@ -69,13 +70,13 @@ void main(void)
|
||||||
createVertex(0, 2, canopy_height, 0.0);
|
createVertex(0, 2, canopy_height, 0.0);
|
||||||
createVertex(0, 2, 0.0, 0.0);
|
createVertex(0, 2, 0.0, 0.0);
|
||||||
EndPrimitive();
|
EndPrimitive();
|
||||||
|
|
||||||
createVertex(0, 1, canopy_height, 1.0);
|
|
||||||
createVertex(1, 2, canopy_height, 1.0);
|
|
||||||
createVertex(2, 0, canopy_height, 1.0);
|
|
||||||
EndPrimitive();
|
|
||||||
createVertex(0, 1, 0.0, 0.0);
|
createVertex(0, 1, 0.0, 0.0);
|
||||||
createVertex(1, 2, 0.0, 0.0);
|
createVertex(1, 2, 0.0, 0.0);
|
||||||
createVertex(2, 0, 0.0, 0.0);
|
createVertex(2, 0, 0.0, 0.0);
|
||||||
EndPrimitive();
|
EndPrimitive();
|
||||||
|
}
|
||||||
|
createVertex(0, 1, canopy_height, 1.0);
|
||||||
|
createVertex(1, 2, canopy_height, 1.0);
|
||||||
|
createVertex(2, 0, canopy_height, 1.0);
|
||||||
|
EndPrimitive();
|
||||||
}
|
}
|
||||||
|
|
BIN
Textures/Terrain/shrub1.png
Normal file
BIN
Textures/Terrain/shrub1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 161 KiB |
Loading…
Reference in a new issue