1
0
Fork 0

Create effects for shrub type landmass with no or little height. Add a new shrub texture contributed by Yves

This commit is contained in:
fredb 2010-04-11 08:36:36 +00:00
parent 65007fd4b3
commit 52c46e87c9
4 changed files with 44 additions and 20 deletions

View 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>

View 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>

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB