Issue 209: fix up inheritance of color mode uniform in material animation effect
The overriding of the color mode uniform in the default model effect wasn't working. It's difficult to override the individual properties of techniques, especially if their names aren't unique. So, I changed the model-default effect to use a parameter for the color-mode uniform; material-off.eff and material-diffuse.eff override that.
This commit is contained in:
parent
48e2672647
commit
564c69e10a
3 changed files with 14 additions and 23 deletions
|
@ -1,18 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PropertyList>
|
||||
<name>Effects/material-diffuse</name>
|
||||
<parameters>
|
||||
<material>
|
||||
<color-mode-uniform>1</color-mode-uniform> <!-- DIFFUSE -->
|
||||
</material>
|
||||
</parameters>
|
||||
<inherits-from>Effects/model-default</inherits-from>
|
||||
<technique n="10">
|
||||
<pass>
|
||||
<program>
|
||||
<vertex-shader>Shaders/default.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/default.frag</fragment-shader>
|
||||
</program>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>1</value> <!-- DIFFUSE -->
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PropertyList>
|
||||
<name>Effects/material-off</name>
|
||||
<parameters>
|
||||
<material>
|
||||
<color-mode-uniform>0</color-mode-uniform> <!-- OFF -->
|
||||
</material>
|
||||
</parameters>
|
||||
<inherits-from>Effects/model-default</inherits-from>
|
||||
<technique n="10">
|
||||
<pass>
|
||||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>0</value> <!-- OFF -->
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
</PropertyList>
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
<type>white</type>
|
||||
</texture>
|
||||
<vertex-program-two-side type="bool">false</vertex-program-two-side>
|
||||
<material>
|
||||
<color-mode-uniform>1</color-mode-uniform> <!-- DIFFUSE -->
|
||||
</material>
|
||||
</parameters>
|
||||
<technique n="10">
|
||||
<predicate>
|
||||
|
@ -76,7 +79,7 @@
|
|||
<uniform>
|
||||
<name>colorMode</name>
|
||||
<type>int</type>
|
||||
<value>1</value> <!-- DIFFUSE -->
|
||||
<value><use>material/color-mode-uniform</use></value>
|
||||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
|
|
Loading…
Reference in a new issue