Remove intermediate quality settings from the ubershader. Fix a texture.
This commit is contained in:
parent
830f8dacee
commit
7f183e0117
10 changed files with 128 additions and 159 deletions
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
|
@ -93,9 +93,9 @@ the objects that use it, and replaces it with the default shader.
|
||||||
<image>
|
<image>
|
||||||
<use>texture[0]/image</use>
|
<use>texture[0]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[0]/type</use>
|
<use>texture[0]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[0]/filter</use>
|
<use>texture[0]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -120,9 +120,9 @@ the objects that use it, and replaces it with the default shader.
|
||||||
<image>
|
<image>
|
||||||
<use>texture[2]/image</use>
|
<use>texture[2]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[2]/type</use>
|
<use>texture[2]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[2]/filter</use>
|
<use>texture[2]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -142,9 +142,9 @@ the objects that use it, and replaces it with the default shader.
|
||||||
<image>
|
<image>
|
||||||
<use>texture[3]/image</use>
|
<use>texture[3]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[3]/type</use>
|
<use>texture[3]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[3]/filter</use>
|
<use>texture[3]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -164,9 +164,9 @@ the objects that use it, and replaces it with the default shader.
|
||||||
<image>
|
<image>
|
||||||
<use>texture[4]/image</use>
|
<use>texture[4]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[4]/type</use>
|
<use>texture[4]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[4]/filter</use>
|
<use>texture[4]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -201,9 +201,9 @@ the objects that use it, and replaces it with the default shader.
|
||||||
<image>
|
<image>
|
||||||
<use>texture[6]/image</use>
|
<use>texture[6]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[6]/type</use>
|
<use>texture[6]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[6]/filter</use>
|
<use>texture[6]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -218,7 +218,7 @@ the objects that use it, and replaces it with the default shader.
|
||||||
</internal-format>
|
</internal-format>
|
||||||
</texture-unit>
|
</texture-unit>
|
||||||
<!-- Reflection rainbow texture unit-->
|
<!-- Reflection rainbow texture unit-->
|
||||||
<!-- <texture-unit>
|
<!-- <texture-unit>
|
||||||
<unit>7</unit>
|
<unit>7</unit>
|
||||||
<image>
|
<image>
|
||||||
<use>texture[7]/image</use>
|
<use>texture[7]/image</use>
|
||||||
|
@ -235,7 +235,7 @@ the objects that use it, and replaces it with the default shader.
|
||||||
<internal-format>
|
<internal-format>
|
||||||
<use>texture[7]/internal-format</use>
|
<use>texture[7]/internal-format</use>
|
||||||
</internal-format>
|
</internal-format>
|
||||||
</texture-unit>-->
|
</texture-unit>-->
|
||||||
|
|
||||||
|
|
||||||
<vertex-program-two-side>
|
<vertex-program-two-side>
|
||||||
|
@ -285,7 +285,7 @@ the objects that use it, and replaces it with the default shader.
|
||||||
<value type="int">5</value>
|
<value type="int">5</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
|
|
||||||
<!-- <uniform>
|
<!-- <uniform>
|
||||||
<name>ReflFresnelTex</name>
|
<name>ReflFresnelTex</name>
|
||||||
<type>sampler-2d</type>
|
<type>sampler-2d</type>
|
||||||
<value type="int">6</value>
|
<value type="int">6</value>
|
||||||
|
@ -295,12 +295,12 @@ the objects that use it, and replaces it with the default shader.
|
||||||
<name>ReflRainbowTex</name>
|
<name>ReflRainbowTex</name>
|
||||||
<type>sampler-2d</type>
|
<type>sampler-2d</type>
|
||||||
<value type="int">7</value>
|
<value type="int">7</value>
|
||||||
</uniform>-->
|
</uniform>-->
|
||||||
|
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>ReflGradientsTex</name>
|
<name>ReflGradientsTex</name>
|
||||||
<type>sampler-2d</type>
|
<type>sampler-2d</type>
|
||||||
<value type="int">6</value>
|
<value type="int">6</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
|
|
||||||
<!-- NORMAL MAP -->
|
<!-- NORMAL MAP -->
|
||||||
|
@ -546,14 +546,6 @@ the objects that use it, and replaces it with the default shader.
|
||||||
<use>ambient-correction</use>
|
<use>ambient-correction</use>
|
||||||
</value>
|
</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
<!-- shader quality -->
|
|
||||||
<uniform>
|
|
||||||
<name>shader_qual</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>shader-quality</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>hdg</name>
|
<name>hdg</name>
|
||||||
|
|
|
@ -79,13 +79,13 @@ and fallback to plain transparency when the model shader is disabled.
|
||||||
<bin-name>DepthSortedBin</bin-name>
|
<bin-name>DepthSortedBin</bin-name>
|
||||||
</render-bin>
|
</render-bin>
|
||||||
<texture-unit>
|
<texture-unit>
|
||||||
<unit>0</unit>
|
<unit>0</unit>
|
||||||
<active>
|
<active>
|
||||||
<use>texture[0]/active</use>
|
<use>texture[0]/active</use>
|
||||||
</active>
|
</active>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[0]/type</use>
|
<use>texture[0]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<image>
|
<image>
|
||||||
<use>texture[0]/image</use>
|
<use>texture[0]/image</use>
|
||||||
</image>
|
</image>
|
||||||
|
@ -198,9 +198,9 @@ and fallback to plain transparency when the model shader is disabled.
|
||||||
<image>
|
<image>
|
||||||
<use>texture[0]/image</use>
|
<use>texture[0]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[0]/type</use>
|
<use>texture[0]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[0]/filter</use>
|
<use>texture[0]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -225,9 +225,9 @@ and fallback to plain transparency when the model shader is disabled.
|
||||||
<image>
|
<image>
|
||||||
<use>texture[2]/image</use>
|
<use>texture[2]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[2]/type</use>
|
<use>texture[2]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[2]/filter</use>
|
<use>texture[2]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -247,9 +247,9 @@ and fallback to plain transparency when the model shader is disabled.
|
||||||
<image>
|
<image>
|
||||||
<use>texture[3]/image</use>
|
<use>texture[3]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[3]/type</use>
|
<use>texture[3]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[3]/filter</use>
|
<use>texture[3]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -269,9 +269,9 @@ and fallback to plain transparency when the model shader is disabled.
|
||||||
<image>
|
<image>
|
||||||
<use>texture[4]/image</use>
|
<use>texture[4]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[4]/type</use>
|
<use>texture[4]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[4]/filter</use>
|
<use>texture[4]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -308,9 +308,9 @@ and fallback to plain transparency when the model shader is disabled.
|
||||||
<image>
|
<image>
|
||||||
<use>texture[6]/image</use>
|
<use>texture[6]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[6]/type</use>
|
<use>texture[6]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[6]/filter</use>
|
<use>texture[6]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -629,14 +629,6 @@ and fallback to plain transparency when the model shader is disabled.
|
||||||
<use>ambient-correction</use>
|
<use>ambient-correction</use>
|
||||||
</value>
|
</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
<!-- shader quality -->
|
|
||||||
<uniform>
|
|
||||||
<name>shader_qual</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>shader-quality</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>hdg</name>
|
<name>hdg</name>
|
||||||
|
|
|
@ -8,16 +8,16 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
|
|
||||||
<parameters>
|
<parameters>
|
||||||
<!-- Diffuse Texture -->
|
<!-- Diffuse Texture -->
|
||||||
<!-- <texture n ="0">
|
<!-- <texture n ="0">
|
||||||
<type>white</type>
|
<type>white</type>
|
||||||
</texture>-->
|
</texture>-->
|
||||||
<!-- Normal Map -->
|
<!-- Normal Map -->
|
||||||
<normalmap-enabled type="int">0</normalmap-enabled>
|
<normalmap-enabled type="int">0</normalmap-enabled>
|
||||||
<normalmap-dds type="int">0</normalmap-dds>
|
<normalmap-dds type="int">0</normalmap-dds>
|
||||||
<normalmap-tiling type="float">1.0</normalmap-tiling>
|
<normalmap-tiling type="float">1.0</normalmap-tiling>
|
||||||
<texture n="2">
|
<texture n="2">
|
||||||
<image>Aircraft/Generic/Effects/null_bumpspec.png</image>
|
<image>Aircraft/Generic/Effects/null_bumpspec.png</image>
|
||||||
<type>2d</type>
|
<type>2d</type>
|
||||||
<filter>linear-mipmap-linear</filter>
|
<filter>linear-mipmap-linear</filter>
|
||||||
<wrap-s>clamp</wrap-s>
|
<wrap-s>clamp</wrap-s>
|
||||||
<wrap-t>clamp</wrap-t>
|
<wrap-t>clamp</wrap-t>
|
||||||
|
@ -36,7 +36,7 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color>
|
<lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color>
|
||||||
<texture n="3">
|
<texture n="3">
|
||||||
<image>Aircraft/Generic/Effects/greymap.png</image>
|
<image>Aircraft/Generic/Effects/greymap.png</image>
|
||||||
<type>2d</type>
|
<type>2d</type>
|
||||||
<filter>linear-mipmap-linear</filter>
|
<filter>linear-mipmap-linear</filter>
|
||||||
<wrap-s>clamp</wrap-s>
|
<wrap-s>clamp</wrap-s>
|
||||||
<wrap-t>clamp</wrap-t>
|
<wrap-t>clamp</wrap-t>
|
||||||
|
@ -49,7 +49,7 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<reflection-dynamic type="int">0</reflection-dynamic>
|
<reflection-dynamic type="int">0</reflection-dynamic>
|
||||||
<texture n="4">
|
<texture n="4">
|
||||||
<image>Aircraft/Generic/Effects/ReflectMaps/reflectmap.png</image>
|
<image>Aircraft/Generic/Effects/ReflectMaps/reflectmap.png</image>
|
||||||
<type>2d</type>
|
<type>2d</type>
|
||||||
<filter>linear-mipmap-linear</filter>
|
<filter>linear-mipmap-linear</filter>
|
||||||
<wrap-s>clamp</wrap-s>
|
<wrap-s>clamp</wrap-s>
|
||||||
<wrap-t>clamp</wrap-t>
|
<wrap-t>clamp</wrap-t>
|
||||||
|
@ -76,7 +76,7 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<reflection-fresnel type="float">0.1</reflection-fresnel>
|
<reflection-fresnel type="float">0.1</reflection-fresnel>
|
||||||
<texture n="6">
|
<texture n="6">
|
||||||
<image>Aircraft/Generic/Effects/Gradients.png</image>
|
<image>Aircraft/Generic/Effects/Gradients.png</image>
|
||||||
<type>2d</type>
|
<type>2d</type>
|
||||||
<filter>linear-mipmap-linear</filter>
|
<filter>linear-mipmap-linear</filter>
|
||||||
<wrap-s>repeat</wrap-s>
|
<wrap-s>repeat</wrap-s>
|
||||||
<wrap-t>repeat</wrap-t>
|
<wrap-t>repeat</wrap-t>
|
||||||
|
@ -91,7 +91,7 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<grain-magnification type="float">10</grain-magnification>
|
<grain-magnification type="float">10</grain-magnification>
|
||||||
<texture n="7">
|
<texture n="7">
|
||||||
<image>Textures/Terrain/void.png</image>
|
<image>Textures/Terrain/void.png</image>
|
||||||
<type>2d</type>
|
<type>2d</type>
|
||||||
<filter>linear-mipmap-linear</filter>
|
<filter>linear-mipmap-linear</filter>
|
||||||
<wrap-s>repeat</wrap-s>
|
<wrap-s>repeat</wrap-s>
|
||||||
<wrap-t>repeat</wrap-t>
|
<wrap-t>repeat</wrap-t>
|
||||||
|
@ -109,10 +109,6 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<dirt-factor type="float" n="2">0.0</dirt-factor>
|
<dirt-factor type="float" n="2">0.0</dirt-factor>
|
||||||
<!-- ambient correction -->
|
<!-- ambient correction -->
|
||||||
<ambient-correction type="float">0.05</ambient-correction>
|
<ambient-correction type="float">0.05</ambient-correction>
|
||||||
<!-- quality slider -->
|
|
||||||
<shader-quality type="int">
|
|
||||||
<use>/sim/rendering/shaders/model</use>
|
|
||||||
</shader-quality>
|
|
||||||
<rendering-hint>opaque</rendering-hint>
|
<rendering-hint>opaque</rendering-hint>
|
||||||
<transparent>false</transparent>
|
<transparent>false</transparent>
|
||||||
<render-bin>
|
<render-bin>
|
||||||
|
@ -245,9 +241,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[0]/image</use>
|
<use>texture[0]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[0]/type</use>
|
<use>texture[0]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[0]/filter</use>
|
<use>texture[0]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -272,9 +268,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[2]/image</use>
|
<use>texture[2]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[2]/type</use>
|
<use>texture[2]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[2]/filter</use>
|
<use>texture[2]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -294,9 +290,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[3]/image</use>
|
<use>texture[3]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[3]/type</use>
|
<use>texture[3]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[3]/filter</use>
|
<use>texture[3]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -316,9 +312,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[4]/image</use>
|
<use>texture[4]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[4]/type</use>
|
<use>texture[4]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[4]/filter</use>
|
<use>texture[4]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -355,9 +351,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[6]/image</use>
|
<use>texture[6]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[6]/type</use>
|
<use>texture[6]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[6]/filter</use>
|
<use>texture[6]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -377,9 +373,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[7]/image</use>
|
<use>texture[7]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[7]/type</use>
|
<use>texture[7]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[7]/filter</use>
|
<use>texture[7]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -712,14 +708,6 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<use>ambient-correction</use>
|
<use>ambient-correction</use>
|
||||||
</value>
|
</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
<!-- shader quality -->
|
|
||||||
<uniform>
|
|
||||||
<name>shader_qual</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>shader-quality</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>hdg</name>
|
<name>hdg</name>
|
||||||
|
@ -922,9 +910,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[0]/image</use>
|
<use>texture[0]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[0]/type</use>
|
<use>texture[0]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[0]/filter</use>
|
<use>texture[0]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -949,9 +937,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[2]/image</use>
|
<use>texture[2]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[2]/type</use>
|
<use>texture[2]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[2]/filter</use>
|
<use>texture[2]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -971,9 +959,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[3]/image</use>
|
<use>texture[3]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[3]/type</use>
|
<use>texture[3]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[3]/filter</use>
|
<use>texture[3]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -993,9 +981,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[4]/image</use>
|
<use>texture[4]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[4]/type</use>
|
<use>texture[4]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[4]/filter</use>
|
<use>texture[4]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -1032,9 +1020,9 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<image>
|
<image>
|
||||||
<use>texture[6]/image</use>
|
<use>texture[6]/image</use>
|
||||||
</image>
|
</image>
|
||||||
<type>
|
<type>
|
||||||
<use>texture[6]/type</use>
|
<use>texture[6]/type</use>
|
||||||
</type>
|
</type>
|
||||||
<filter>
|
<filter>
|
||||||
<use>texture[6]/filter</use>
|
<use>texture[6]/filter</use>
|
||||||
</filter>
|
</filter>
|
||||||
|
@ -1353,14 +1341,6 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
<use>ambient-correction</use>
|
<use>ambient-correction</use>
|
||||||
</value>
|
</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
<!-- shader quality -->
|
|
||||||
<uniform>
|
|
||||||
<name>shader_qual</name>
|
|
||||||
<type>int</type>
|
|
||||||
<value>
|
|
||||||
<use>shader-quality</use>
|
|
||||||
</value>
|
|
||||||
</uniform>
|
|
||||||
|
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>hdg</name>
|
<name>hdg</name>
|
||||||
|
|
|
@ -64,17 +64,20 @@ void main(void)
|
||||||
normal.xy = vec2(dot(normal.xy, vec2(cr, sr)), dot(normal.xy, vec2(-sr, cr)));
|
normal.xy = vec2(dot(normal.xy, vec2(cr, sr)), dot(normal.xy, vec2(-sr, cr)));
|
||||||
//normal = gl_NormalMatrix * normal;
|
//normal = gl_NormalMatrix * normal;
|
||||||
|
|
||||||
VNormal = normalize(gl_NormalMatrix * normal);
|
VNormal = normalize(gl_NormalMatrix * normal);
|
||||||
if (nmap_enabled > 0 && shader_qual > 2){
|
vec3 n = normalize(normal);
|
||||||
VTangent = normalize(gl_NormalMatrix * tangent);
|
vec3 tempTangent = cross(n, vec3(1.0,0.0,0.0));
|
||||||
VBinormal = normalize(gl_NormalMatrix * binormal);
|
vec3 tempBinormal = cross(n, tempTangent);
|
||||||
} else {
|
|
||||||
VTangent = vec3(0.0);
|
if (nmap_enabled > 0){
|
||||||
VBinormal = vec3 (0.0);
|
tempTangent = tangent;
|
||||||
}
|
tempBinormal = binormal;
|
||||||
vec3 n = normalize(normal);
|
}
|
||||||
vec3 t = cross(n, vec3(1.0,0.0,0.0));
|
|
||||||
vec3 b = cross(n,t);
|
VTangent = normalize(gl_NormalMatrix * tempTangent);
|
||||||
|
VBinormal = normalize(gl_NormalMatrix * tempBinormal);
|
||||||
|
vec3 t = tempTangent;
|
||||||
|
vec3 b = tempBinormal;
|
||||||
|
|
||||||
// Super hack: if diffuse material alpha is less than 1, assume a
|
// Super hack: if diffuse material alpha is less than 1, assume a
|
||||||
// transparency animation is at work
|
// transparency animation is at work
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// Authors: Frederic Bouvier and Gijs de Rooy
|
// Authors: Frederic Bouvier and Gijs de Rooy
|
||||||
// with major additions and revisions by
|
// with major additions and revisions by
|
||||||
// Emilian Huminiuc and Vivian Meazza 2011
|
// Emilian Huminiuc and Vivian Meazza 2011
|
||||||
|
#version 120
|
||||||
|
|
||||||
varying vec3 rawpos;
|
varying vec3 rawpos;
|
||||||
varying vec3 VNormal;
|
varying vec3 VNormal;
|
||||||
|
@ -27,7 +28,6 @@ uniform int refl_enabled;
|
||||||
uniform int refl_map;
|
uniform int refl_map;
|
||||||
uniform int lightmap_enabled;
|
uniform int lightmap_enabled;
|
||||||
uniform int lightmap_multi;
|
uniform int lightmap_multi;
|
||||||
uniform int shader_qual;
|
|
||||||
uniform int dirt_enabled;
|
uniform int dirt_enabled;
|
||||||
uniform int dirt_multi;
|
uniform int dirt_multi;
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ void main (void)
|
||||||
float pf;
|
float pf;
|
||||||
|
|
||||||
///BEGIN bump
|
///BEGIN bump
|
||||||
if (nmap_enabled > 0 && shader_qual > 2){
|
if (nmap_enabled > 0){
|
||||||
N = nmap.rgb * 2.0 - 1.0;
|
N = nmap.rgb * 2.0 - 1.0;
|
||||||
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
||||||
if (nmap_dds > 0)
|
if (nmap_dds > 0)
|
||||||
|
@ -100,7 +100,7 @@ void main (void)
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
//BEGIN reflect
|
//BEGIN reflect
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
if (refl_enabled > 0 && shader_qual > 1){
|
if (refl_enabled > 0){
|
||||||
float reflFactor;
|
float reflFactor;
|
||||||
float transparency_offset = clamp(refl_correction, -1.0, 1.0);// set the user shininess offset
|
float transparency_offset = clamp(refl_correction, -1.0, 1.0);// set the user shininess offset
|
||||||
if(refl_map > 0){
|
if(refl_map > 0){
|
||||||
|
@ -163,7 +163,7 @@ void main (void)
|
||||||
vec3 lightmapcolor;
|
vec3 lightmapcolor;
|
||||||
vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor, lightmap_b_factor, lightmap_a_factor);
|
vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor, lightmap_b_factor, lightmap_a_factor);
|
||||||
lightmapFactor = lightmapFactor * lightmapTexel;
|
lightmapFactor = lightmapFactor * lightmapTexel;
|
||||||
if (lightmap_multi >0 ){
|
if (lightmap_multi > 0 ){
|
||||||
lightmapcolor = lightmap_r_color * lightmapFactor.r +
|
lightmapcolor = lightmap_r_color * lightmapFactor.r +
|
||||||
lightmap_g_color * lightmapFactor.g +
|
lightmap_g_color * lightmapFactor.g +
|
||||||
lightmap_b_color * lightmapFactor.b +
|
lightmap_b_color * lightmapFactor.b +
|
||||||
|
|
|
@ -36,7 +36,6 @@ uniform int nmap_dds;
|
||||||
uniform int nmap_enabled;
|
uniform int nmap_enabled;
|
||||||
uniform int refl_enabled;
|
uniform int refl_enabled;
|
||||||
uniform int refl_map;
|
uniform int refl_map;
|
||||||
uniform int shader_qual;
|
|
||||||
uniform int grain_texture_enabled;
|
uniform int grain_texture_enabled;
|
||||||
|
|
||||||
uniform float amb_correction;
|
uniform float amb_correction;
|
||||||
|
@ -218,7 +217,7 @@ void main (void)
|
||||||
/// END grain overlay
|
/// END grain overlay
|
||||||
|
|
||||||
///BEGIN bump
|
///BEGIN bump
|
||||||
if (nmap_enabled > 0 && shader_qual > 2){
|
if (nmap_enabled > 0){
|
||||||
N = nmap.rgb * 2.0 - 1.0;
|
N = nmap.rgb * 2.0 - 1.0;
|
||||||
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
||||||
if (nmap_dds > 0)
|
if (nmap_dds > 0)
|
||||||
|
@ -258,7 +257,7 @@ void main (void)
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
//BEGIN reflect
|
//BEGIN reflect
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
if (refl_enabled > 0 && shader_qual > 1){
|
if (refl_enabled > 0){
|
||||||
float reflFactor = 0.0;
|
float reflFactor = 0.0;
|
||||||
float transparency_offset = clamp(refl_correction, -1.0, 1.0);// set the user shininess offset
|
float transparency_offset = clamp(refl_correction, -1.0, 1.0);// set the user shininess offset
|
||||||
|
|
||||||
|
@ -266,7 +265,7 @@ void main (void)
|
||||||
// map the shininess of the object with user input
|
// map the shininess of the object with user input
|
||||||
//float pam = (map.a * -2) + 1; //reverse map
|
//float pam = (map.a * -2) + 1; //reverse map
|
||||||
reflFactor = reflmap.a + transparency_offset;
|
reflFactor = reflmap.a + transparency_offset;
|
||||||
} else if (nmap_enabled > 0 && shader_qual > 2) {
|
} else if (nmap_enabled > 0) {
|
||||||
// set the reflectivity proportional to shininess with user input
|
// set the reflectivity proportional to shininess with user input
|
||||||
reflFactor = gl_FrontMaterial.shininess * 0.0078125 * nmap.a + transparency_offset;
|
reflFactor = gl_FrontMaterial.shininess * 0.0078125 * nmap.a + transparency_offset;
|
||||||
} else {
|
} else {
|
||||||
|
@ -331,7 +330,7 @@ void main (void)
|
||||||
vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor,
|
vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor,
|
||||||
lightmap_b_factor, lightmap_a_factor);
|
lightmap_b_factor, lightmap_a_factor);
|
||||||
lightmapFactor = lightmapFactor * lightmapTexel;
|
lightmapFactor = lightmapFactor * lightmapTexel;
|
||||||
if (lightmap_multi >0 ){
|
if (lightmap_multi > 0 ){
|
||||||
lightmapcolor = lightmap_r_color * lightmapFactor.r +
|
lightmapcolor = lightmap_r_color * lightmapFactor.r +
|
||||||
lightmap_g_color * lightmapFactor.g +
|
lightmap_g_color * lightmapFactor.g +
|
||||||
lightmap_b_color * lightmapFactor.b +
|
lightmap_b_color * lightmapFactor.b +
|
||||||
|
|
|
@ -30,7 +30,6 @@ uniform int nmap_dds;
|
||||||
uniform int nmap_enabled;
|
uniform int nmap_enabled;
|
||||||
uniform int refl_enabled;
|
uniform int refl_enabled;
|
||||||
uniform int refl_map;
|
uniform int refl_map;
|
||||||
uniform int shader_qual;
|
|
||||||
|
|
||||||
uniform float amb_correction;
|
uniform float amb_correction;
|
||||||
uniform float dirt_b_factor;
|
uniform float dirt_b_factor;
|
||||||
|
@ -73,7 +72,7 @@ void main (void)
|
||||||
float pf = 0.0;
|
float pf = 0.0;
|
||||||
|
|
||||||
///BEGIN bump
|
///BEGIN bump
|
||||||
if (nmap_enabled > 0 && shader_qual > 2){
|
if (nmap_enabled > 0 ){
|
||||||
N = nmap.rgb * 2.0 - 1.0;
|
N = nmap.rgb * 2.0 - 1.0;
|
||||||
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
N = normalize(N.x * VTangent + N.y * VBinormal + N.z * VNormal);
|
||||||
if (nmap_dds > 0)
|
if (nmap_dds > 0)
|
||||||
|
@ -111,7 +110,7 @@ void main (void)
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
//BEGIN reflect
|
//BEGIN reflect
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
if (refl_enabled > 0 && shader_qual > 1){
|
if (refl_enabled > 0 ){
|
||||||
float reflFactor = 0.0;
|
float reflFactor = 0.0;
|
||||||
float transparency_offset = clamp(refl_correction, -1.0, 1.0);// set the user shininess offset
|
float transparency_offset = clamp(refl_correction, -1.0, 1.0);// set the user shininess offset
|
||||||
|
|
||||||
|
@ -119,7 +118,7 @@ void main (void)
|
||||||
// map the shininess of the object with user input
|
// map the shininess of the object with user input
|
||||||
//float pam = (map.a * -2) + 1; //reverse map
|
//float pam = (map.a * -2) + 1; //reverse map
|
||||||
reflFactor = reflmap.a + transparency_offset;
|
reflFactor = reflmap.a + transparency_offset;
|
||||||
} else if (nmap_enabled > 0 && shader_qual > 2) {
|
} else if (nmap_enabled > 0) {
|
||||||
// set the reflectivity proportional to shininess with user input
|
// set the reflectivity proportional to shininess with user input
|
||||||
reflFactor = gl_FrontMaterial.shininess * 0.0078125 * nmap.a + transparency_offset;
|
reflFactor = gl_FrontMaterial.shininess * 0.0078125 * nmap.a + transparency_offset;
|
||||||
} else {
|
} else {
|
||||||
|
@ -182,7 +181,7 @@ void main (void)
|
||||||
vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor,
|
vec4 lightmapFactor = vec4(lightmap_r_factor, lightmap_g_factor,
|
||||||
lightmap_b_factor, lightmap_a_factor);
|
lightmap_b_factor, lightmap_a_factor);
|
||||||
lightmapFactor = lightmapFactor * lightmapTexel;
|
lightmapFactor = lightmapFactor * lightmapTexel;
|
||||||
if (lightmap_multi >0 ){
|
if (lightmap_multi > 0 ){
|
||||||
lightmapcolor = lightmap_r_color * lightmapFactor.r +
|
lightmapcolor = lightmap_r_color * lightmapFactor.r +
|
||||||
lightmap_g_color * lightmapFactor.g +
|
lightmap_g_color * lightmapFactor.g +
|
||||||
lightmap_b_color * lightmapFactor.b +
|
lightmap_b_color * lightmapFactor.b +
|
||||||
|
|
|
@ -52,19 +52,23 @@ void main(void)
|
||||||
//fog_Func(fogType);
|
//fog_Func(fogType);
|
||||||
|
|
||||||
VNormal = normalize(gl_NormalMatrix * gl_Normal);
|
VNormal = normalize(gl_NormalMatrix * gl_Normal);
|
||||||
if (nmap_enabled > 0 && shader_qual > 2){
|
|
||||||
VTangent = normalize(gl_NormalMatrix * tangent);
|
|
||||||
VBinormal = normalize(gl_NormalMatrix * binormal);
|
|
||||||
} else {
|
|
||||||
VTangent = vec3(0.0);
|
|
||||||
VBinormal = vec3 (0.0);
|
|
||||||
}
|
|
||||||
vec3 n = normalize(gl_Normal);
|
|
||||||
vec3 t = cross(n, vec3(1.0,0.0,0.0));
|
|
||||||
vec3 b = cross(n,t);
|
|
||||||
|
|
||||||
// Super hack: if diffuse material alpha is less than 1, assume a
|
vec3 n = normalize(gl_Normal);
|
||||||
// transparency animation is at work
|
vec3 tempTangent = cross(n, vec3(1.0,0.0,0.0));
|
||||||
|
vec3 tempBinormal = cross(n, tempTangent);
|
||||||
|
|
||||||
|
if (nmap_enabled > 0){
|
||||||
|
tempTangent = tangent;
|
||||||
|
tempBinormal = binormal;
|
||||||
|
}
|
||||||
|
|
||||||
|
VTangent = normalize(gl_NormalMatrix * tempTangent);
|
||||||
|
VBinormal = normalize(gl_NormalMatrix * tempBinormal);
|
||||||
|
vec3 t = tempTangent;
|
||||||
|
vec3 b = tempBinormal;
|
||||||
|
|
||||||
|
// Super hack: if diffuse material alpha is less than 1, assume a
|
||||||
|
// transparency animation is at work
|
||||||
if (gl_FrontMaterial.diffuse.a < 1.0)
|
if (gl_FrontMaterial.diffuse.a < 1.0)
|
||||||
alpha = gl_FrontMaterial.diffuse.a;
|
alpha = gl_FrontMaterial.diffuse.a;
|
||||||
else
|
else
|
||||||
|
@ -76,7 +80,7 @@ void main(void)
|
||||||
vViewVec.y = dot(b, vertVec);
|
vViewVec.y = dot(b, vertVec);
|
||||||
vViewVec.z = dot(n, vertVec);
|
vViewVec.z = dot(n, vertVec);
|
||||||
|
|
||||||
// calculate the reflection vector
|
// calculate the reflection vector
|
||||||
vec4 reflect_eye = vec4(reflect(vertVec, VNormal), 0.0);
|
vec4 reflect_eye = vec4(reflect(vertVec, VNormal), 0.0);
|
||||||
vec3 reflVec_stat = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz;
|
vec3 reflVec_stat = normalize(gl_ModelViewMatrixInverse * reflect_eye).xyz;
|
||||||
if (refl_dynamic > 0){
|
if (refl_dynamic > 0){
|
||||||
|
|
|
@ -230,9 +230,9 @@
|
||||||
<slider>
|
<slider>
|
||||||
<name>model</name>
|
<name>model</name>
|
||||||
<min>0.0</min>
|
<min>0.0</min>
|
||||||
<max>3.0</max>
|
<max>1.0</max>
|
||||||
<step>1.0</step>
|
<step>1.0</step>
|
||||||
<fraction>0.25</fraction>
|
<fraction>0.5</fraction>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
<property>/sim/rendering/shaders/model</property>
|
<property>/sim/rendering/shaders/model</property>
|
||||||
<binding>
|
<binding>
|
||||||
|
|
Loading…
Reference in a new issue