diff --git a/Effects/crop.eff b/Effects/crop.eff index d6e39bffd..cebf09761 100644 --- a/Effects/crop.eff +++ b/Effects/crop.eff @@ -11,7 +11,7 @@ <internal-format>normalized</internal-format> </texture> <texture n="3"> - <image>Textures/Terrain/cropcolors.png</image> + <image>Textures/Terrain/crop-colors.png</image> <filter>linear-mipmap-linear</filter> <wrap-s>mirror</wrap-s> <internal-format>normalized</internal-format> diff --git a/Effects/cropgrass.eff b/Effects/cropgrass.eff new file mode 100644 index 000000000..1cc7263cf --- /dev/null +++ b/Effects/cropgrass.eff @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8"?> +<PropertyList> + <name>Effects/cropgrass</name> + <inherits-from>Effects/terrain-default</inherits-from> + <parameters> + <texture n="2"> + <image>Textures/Terrain/cropgrass.png</image> + <filter>linear-mipmap-linear</filter> + <wrap-s>repeat</wrap-s> + <wrap-t>repeat</wrap-t> + <internal-format>normalized</internal-format> + </texture> + <texture n="3"> + <image>Textures/Terrain/cropgrass-colors.png</image> + <filter>linear-mipmap-linear</filter> + <wrap-s>mirror</wrap-s> + <internal-format>normalized</internal-format> + </texture> + </parameters> + <technique n="9"> + <predicate> + <and> + <property>/sim/rendering/crop-shader</property> + <property>/sim/rendering/shader-effects</property> + <or> + <less-equal> + <value type="float">2.0</value> + <glversion/> + </less-equal> + <and> + <extension-supported>GL_ARB_shader_objects</extension-supported> + <extension-supported>GL_ARB_shading_language_100</extension-supported> + <extension-supported>GL_ARB_vertex_shader</extension-supported> + <extension-supported>GL_ARB_fragment_shader</extension-supported> + </and> + </or> + </and> + </predicate> + <pass> + <lighting>true</lighting> + <!-- Use material values that are either inherited from the + terrain-default effect or supplied by an effect derived + from this one e.g., one created in the materials library. --> + <material> + <ambient><use>material/ambient</use></ambient> + <diffuse><use>material/diffuse</use></diffuse> + <specular><use>material/specular</use></specular> + <color-mode>ambient-and-diffuse</color-mode> + </material> + <blend><use>transparent</use></blend> + <alpha-test><use>transparent</use></alpha-test> + <shade-model>smooth</shade-model> + <cull-face>back</cull-face> + <render-bin> + <bin-number><use>render-bin/bin-number</use></bin-number> + <bin-name><use>render-bin/bin-name</use></bin-name> + </render-bin> + <texture-unit> + <unit>0</unit> + <type>noise</type> + </texture-unit> + <texture-unit> + <unit>1</unit> + <image><use>texture[2]/image</use></image> + <filter><use>texture[2]/filter</use></filter> + <wrap-s><use>texture[2]/wrap-s</use></wrap-s> + <wrap-t><use>texture[2]/wrap-t</use></wrap-t> + <internal-format> + <use>texture[2]/internal-format</use> + </internal-format> + </texture-unit> + <texture-unit> + <unit>2</unit> + <type>1d</type> + <image><use>texture[3]/image</use></image> + <filter><use>texture[3]/filter</use></filter> + <wrap-s><use>texture[3]/wrap-s</use></wrap-s> + <internal-format> + <use>texture[3]/internal-format</use> + </internal-format> + </texture-unit> + <program> + <vertex-shader>Shaders/crop.vert</vertex-shader> + <fragment-shader>Shaders/crop.frag</fragment-shader> + </program> + <uniform> + <name>NoiseTex</name> + <type>sampler-3d</type> + <value type="int">0</value> + </uniform> + <uniform> + <name>SampleTex</name> + <type>sampler-2d</type> + <value type="int">1</value> + </uniform> + <uniform> + <name>ColorsTex</name> + <type>sampler-1d</type> + <value type="int">2</value> + </uniform> + </pass> + </technique> +</PropertyList> diff --git a/Textures/Terrain/cropcolors.png b/Textures/Terrain/crop-colors.png similarity index 100% rename from Textures/Terrain/cropcolors.png rename to Textures/Terrain/crop-colors.png diff --git a/Textures/Terrain/cropgrass-colors.png b/Textures/Terrain/cropgrass-colors.png new file mode 100644 index 000000000..edf0d9f51 Binary files /dev/null and b/Textures/Terrain/cropgrass-colors.png differ diff --git a/Textures/Terrain/cropgrass.png b/Textures/Terrain/cropgrass.png index 5a26033a1..81c53c281 100644 Binary files a/Textures/Terrain/cropgrass.png and b/Textures/Terrain/cropgrass.png differ diff --git a/materials.xml b/materials.xml index 8e41fbfd9..3fd52ed4c 100644 --- a/materials.xml +++ b/materials.xml @@ -1474,7 +1474,7 @@ Shared parameters for various materials. <value>summer</value> </equals> </condition> - <effect>Effects/crop</effect> + <effect>Effects/cropgrass</effect> <name>CropGrassCover</name> <name>CropGrass</name> <texture>Terrain/cropgrass1.png</texture>