1
0
Fork 0

Re-arrange effects using texture units >= 8 down to unused lower-numbered units. Especially move the noise texture down to the first available slot.

This commit is contained in:
James Turner 2012-01-11 23:22:44 +00:00
parent fa4e71a246
commit 37a964ec92
8 changed files with 136 additions and 148 deletions

View file

@ -202,6 +202,10 @@
<use>texture[0]/internal-format</use> <use>texture[0]/internal-format</use>
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<texture-unit>
<unit>1</unit>
<type>noise</type>
</texture-unit>
<texture-unit> <texture-unit>
<unit>2</unit> <unit>2</unit>
<image> <image>
@ -310,10 +314,7 @@
<use>texture[7]/internal-format</use> <use>texture[7]/internal-format</use>
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<texture-unit>
<unit>9</unit>
<type>noise</type>
</texture-unit>
<program> <program>
<vertex-shader>Shaders/include_fog.vert</vertex-shader> <vertex-shader>Shaders/include_fog.vert</vertex-shader>
<vertex-shader>Shaders/wake.vert</vertex-shader> <vertex-shader>Shaders/wake.vert</vertex-shader>
@ -442,7 +443,7 @@
<uniform> <uniform>
<name>Noise</name> <name>Noise</name>
<type>sampler-3d</type> <type>sampler-3d</type>
<value type="int">9</value> <value type="int">1</value>
</uniform> </uniform>
<!-- BEGIN fog include --> <!-- BEGIN fog include -->

View file

@ -137,7 +137,7 @@
--> -->
</texture-unit> </texture-unit>
<texture-unit> <texture-unit>
<unit>9</unit> <unit>1</unit>
<type>noise</type> <type>noise</type>
</texture-unit> </texture-unit>
<vertex-program-two-side> <vertex-program-two-side>
@ -185,7 +185,7 @@
<uniform> <uniform>
<name>Noise</name> <name>Noise</name>
<type>sampler-3d</type> <type>sampler-3d</type>
<value type="int">9</value> <value type="int">1</value>
</uniform> </uniform>
<uniform> <uniform>
<name>WindE</name> <name>WindE</name>

View file

@ -244,6 +244,11 @@ please see Docs/README.model-combined.eff for documentation
<use>texture[0]/internal-format</use> <use>texture[0]/internal-format</use>
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<!-- Reflection Noise texture unit-->
<texture-unit>
<unit>1</unit>
<type>noise</type>
</texture-unit>
<!-- NormalMap texture unit--> <!-- NormalMap texture unit-->
<texture-unit> <texture-unit>
<unit>2</unit> <unit>2</unit>
@ -354,11 +359,7 @@ please see Docs/README.model-combined.eff for documentation
<use>texture[7]/internal-format</use> <use>texture[7]/internal-format</use>
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<!-- Reflection Noise texture unit-->
<texture-unit>
<unit>9</unit>
<type>noise</type>
</texture-unit>
<vertex-program-two-side> <vertex-program-two-side>
<use>vertex-program-two-side</use> <use>vertex-program-two-side</use>
@ -385,6 +386,12 @@ please see Docs/README.model-combined.eff for documentation
<value type="int">0</value> <value type="int">0</value>
</uniform> </uniform>
<uniform>
<name>ReflNoiseTex</name>
<type>sampler-3d</type>
<value type="int">1</value>
</uniform>
<uniform> <uniform>
<name>NormalTex</name> <name>NormalTex</name>
<type>sampler-2d</type> <type>sampler-2d</type>
@ -421,11 +428,7 @@ please see Docs/README.model-combined.eff for documentation
<value type="int">7</value> <value type="int">7</value>
</uniform> </uniform>
<uniform>
<name>ReflNoiseTex</name>
<type>sampler-3d</type>
<value type="int">9</value>
</uniform>
<!-- NORMAL MAP --> <!-- NORMAL MAP -->
<!-- normalmap is used--> <!-- normalmap is used-->

View file

@ -216,6 +216,30 @@ EXAMPLES: You can find examples of both usages in the Hunter and Lightning model
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<texture-unit>
<unit>1</unit>
<image>
<use>texture[8]/image</use>
</image>
<filter>
<use>texture[8]/filter</use>
</filter>
<wrap-s>
<use>texture[8]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[8]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[0]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>2</unit>
<type>noise</type>
</texture-unit>
<texture-unit> <texture-unit>
<unit>4</unit> <unit>4</unit>
<image> <image>
@ -288,30 +312,6 @@ EXAMPLES: You can find examples of both usages in the Hunter and Lightning model
</wrap-t> </wrap-t>
</texture-unit> </texture-unit>
<texture-unit>
<unit>8</unit>
<image>
<use>texture[8]/image</use>
</image>
<filter>
<use>texture[8]/filter</use>
</filter>
<wrap-s>
<use>texture[8]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[8]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[0]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>9</unit>
<type>noise</type>
</texture-unit>
<program> <program>
<vertex-shader>Shaders/include_fog.vert</vertex-shader> <vertex-shader>Shaders/include_fog.vert</vertex-shader>
@ -334,6 +334,18 @@ EXAMPLES: You can find examples of both usages in the Hunter and Lightning model
<value type="int">0</value> <value type="int">0</value>
</uniform> </uniform>
<uniform>
<name>Map</name>
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<uniform>
<name>Noise</name>
<type>sampler-3d</type>
<value type="int">2</value>
</uniform>
<uniform> <uniform>
<name>NormalTex</name> <name>NormalTex</name>
<type>sampler-2d</type> <type>sampler-2d</type>
@ -358,18 +370,6 @@ EXAMPLES: You can find examples of both usages in the Hunter and Lightning model
<value type="int">7</value> <value type="int">7</value>
</uniform> </uniform>
<uniform>
<name>Map</name>
<type>sampler-2d</type>
<value type="int">8</value>
</uniform>
<uniform>
<name>Noise</name>
<type>sampler-3d</type>
<value type="int">9</value>
</uniform>
<!-- set the amount of fringing colour 0.0 - 1.0 --> <!-- set the amount of fringing colour 0.0 - 1.0 -->
<uniform> <uniform>
<name>rainbowiness</name> <name>rainbowiness</name>

View file

@ -195,6 +195,25 @@
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<texture-unit>
<unit>1</unit>
<image>
<use>texture[8]/image</use>
</image>
<filter>
<use>texture[8]/filter</use>
</filter>
<wrap-s>
<use>texture[8]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[8]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[8]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit> <texture-unit>
<unit>2</unit> <unit>2</unit>
<type> <type>
@ -208,6 +227,11 @@
<wrap-t>repeat</wrap-t> <wrap-t>repeat</wrap-t>
</texture-unit> </texture-unit>
<texture-unit>
<unit>3</unit>
<type>noise</type>
</texture-unit>
<texture-unit> <texture-unit>
<unit>5</unit> <unit>5</unit>
<type> <type>
@ -263,31 +287,6 @@
</wrap-t> </wrap-t>
</texture-unit> </texture-unit>
<texture-unit>
<unit>8</unit>
<image>
<use>texture[8]/image</use>
</image>
<filter>
<use>texture[8]/filter</use>
</filter>
<wrap-s>
<use>texture[8]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[8]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[8]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>9</unit>
<type>noise</type>
</texture-unit>
<program> <program>
<vertex-shader n="0">Shaders/include_fog.vert</vertex-shader> <vertex-shader n="0">Shaders/include_fog.vert</vertex-shader>
<vertex-shader n="1">Shaders/reflect.vert</vertex-shader> <vertex-shader n="1">Shaders/reflect.vert</vertex-shader>
@ -313,12 +312,24 @@
<value type="int">0</value> <value type="int">0</value>
</uniform> </uniform>
<uniform>
<name>Map</name>
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<uniform> <uniform>
<name>Lightmap</name> <name>Lightmap</name>
<type>sampler-2d</type> <type>sampler-2d</type>
<value type="int">2</value> <value type="int">2</value>
</uniform> </uniform>
<uniform>
<name>Noise</name>
<type>sampler-3d</type>
<value type="int">3</value>
</uniform>
<uniform> <uniform>
<name>Environment</name> <name>Environment</name>
<type>sampler-cube</type> <type>sampler-cube</type>
@ -336,20 +347,6 @@
<type>sampler-2d</type> <type>sampler-2d</type>
<value type="int">7</value> <value type="int">7</value>
</uniform> </uniform>
<uniform>
<name>Map</name>
<type>sampler-2d</type>
<value type="int">8</value>
</uniform>
<uniform>
<name>Noise</name>
<type>sampler-3d</type>
<value type="int">9</value>
</uniform>
<!-- set the amount of fringing colour 0.0 - 1.0 --> <!-- set the amount of fringing colour 0.0 - 1.0 -->
<uniform> <uniform>
<name>rainbowiness</name> <name>rainbowiness</name>

View file

@ -123,6 +123,31 @@
<use>texture[1]/internal-format</use> <use>texture[1]/internal-format</use>
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<texture-unit>
<unit>1</unit>
<image>
<use>texture[8]/image</use>
</image>
<filter>
<use>texture[8]/filter</use>
</filter>
<wrap-s>
<use>texture[8]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[8]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[0]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>2</unit>
<type>noise</type>
</texture-unit>
<texture-unit> <texture-unit>
<unit>4</unit> <unit>4</unit>
<image> <image>
@ -197,29 +222,6 @@
</wrap-t> </wrap-t>
</texture-unit> </texture-unit>
<texture-unit>
<unit>8</unit>
<image>
<use>texture[8]/image</use>
</image>
<filter>
<use>texture[8]/filter</use>
</filter>
<wrap-s>
<use>texture[8]/wrap-s</use>
</wrap-s>
<wrap-t>
<use>texture[8]/wrap-t</use>
</wrap-t>
<internal-format>
<use>texture[0]/internal-format</use>
</internal-format>
</texture-unit>
<texture-unit>
<unit>9</unit>
<type>noise</type>
</texture-unit>
<vertex-program-two-side> <vertex-program-two-side>
<use>vertex-program-two-side</use> <use>vertex-program-two-side</use>
</vertex-program-two-side> </vertex-program-two-side>
@ -248,6 +250,18 @@
<value type="int">0</value> <value type="int">0</value>
</uniform> </uniform>
<uniform>
<name>Map</name>
<type>sampler-2d</type>
<value type="int">1</value>
</uniform>
<uniform>
<name>Noise</name>
<type>sampler-3d</type>
<value type="int">2</value>
</uniform>
<uniform> <uniform>
<name>NormalTex</name> <name>NormalTex</name>
<type>sampler-2d</type> <type>sampler-2d</type>
@ -272,18 +286,6 @@
<value type="int">7</value> <value type="int">7</value>
</uniform> </uniform>
<uniform>
<name>Map</name>
<type>sampler-2d</type>
<value type="int">8</value>
</uniform>
<uniform>
<name>Noise</name>
<type>sampler-3d</type>
<value type="int">9</value>
</uniform>
<!-- set the amount of fringing colour 0.0 - 1.0 --> <!-- set the amount of fringing colour 0.0 - 1.0 -->
<uniform> <uniform>
<name>rainbowiness</name> <name>rainbowiness</name>

View file

@ -199,6 +199,7 @@
<use>texture[0]/internal-format</use> <use>texture[0]/internal-format</use>
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<texture-unit> <texture-unit>
<unit>2</unit> <unit>2</unit>
<image> <image>
@ -289,10 +290,7 @@
<use>texture[6]/internal-format</use> <use>texture[6]/internal-format</use>
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<texture-unit>
<unit>9</unit>
<type>noise</type>
</texture-unit>
<program> <program>
<vertex-shader>Shaders/include_fog.vert</vertex-shader> <vertex-shader>Shaders/include_fog.vert</vertex-shader>
<vertex-shader>Shaders/water.vert</vertex-shader> <vertex-shader>Shaders/water.vert</vertex-shader>
@ -304,6 +302,7 @@
<type>sampler-2d</type> <type>sampler-2d</type>
<value type="int">0</value> <value type="int">0</value>
</uniform> </uniform>
<uniform> <uniform>
<name>water_normalmap</name> <name>water_normalmap</name>
<type>sampler-2d</type> <type>sampler-2d</type>
@ -449,11 +448,7 @@
</value> </value>
</uniform> </uniform>
<uniform>
<name>Noise</name>
<type>sampler-3d</type>
<value type="int">9</value>
</uniform>
<!-- BEGIN fog include --> <!-- BEGIN fog include -->
<uniform> <uniform>
@ -661,10 +656,7 @@
<use>texture[6]/internal-format</use> <use>texture[6]/internal-format</use>
</internal-format> </internal-format>
</texture-unit> </texture-unit>
<texture-unit>
<unit>9</unit>
<type>noise</type>
</texture-unit>
<program> <program>
<vertex-shader>Shaders/include_fog.vert</vertex-shader> <vertex-shader>Shaders/include_fog.vert</vertex-shader>
<vertex-shader>Shaders/water.vert</vertex-shader> <vertex-shader>Shaders/water.vert</vertex-shader>
@ -823,11 +815,6 @@
</value> </value>
</uniform> </uniform>
<uniform>
<name>Noise</name>
<type>sampler-3d</type>
<value type="int">9</value>
</uniform>
<!-- BEGIN fog include --> <!-- BEGIN fog include -->
<uniform> <uniform>
<name>visibility</name> <name>visibility</name>

View file

@ -14,8 +14,6 @@ uniform sampler2D water_reflection_grey;
uniform sampler2D sea_foam; uniform sampler2D sea_foam;
uniform sampler2D perlin_normalmap; uniform sampler2D perlin_normalmap;
uniform sampler3D Noise;
uniform float saturation, Overcast, WindE, WindN; uniform float saturation, Overcast, WindE, WindN;
uniform float CloudCover0, CloudCover1, CloudCover2, CloudCover3, CloudCover4; uniform float CloudCover0, CloudCover1, CloudCover2, CloudCover3, CloudCover4;
uniform float osg_SimulationTime; uniform float osg_SimulationTime;