Page 1 of 1

EntityCustomParameter: Index <=> Name

Posted: Tue Sep 18, 2012 6:00 am
by DarkDragon
Hello,

The HLSL/GLSL shaders usually don't have an ParameterIndex. They're using a ParameterName. So I would suggest a function like this:

Code: Select all

EntityCustomNamedParameter(#Entity, SubEntityIndex, ParameterName.s, Value1, Value2, Value3, Value4)
But please see it as an additional function, not as a replacement. Maybe the other function should be renamed to EntityCustomIndexedParameter to match the material script naming convention.

Re: EntityCustomParameter: Index <=> Name

Posted: Thu Oct 25, 2012 2:29 am
by idle
+1

Re: EntityCustomParameter: Index <=> Name

Posted: Thu Oct 25, 2012 1:46 pm
by Comtois
you can use custom in material script to control a named parameter :

Code: Select all

fragment_program_ref TextureModColor_PS
            {
                param_named_auto colorModulate custom 1
            }

http://www.ogre3d.org/tikiwiki/tiki-ind ... +Materials

Re: EntityCustomParameter: Index <=> Name

Posted: Thu Oct 25, 2012 8:27 pm
by idle
Works fine thanks

Re: EntityCustomParameter: Index <=> Name

Posted: Fri Oct 26, 2012 7:31 am
by DarkDragon
Handling with numbers instead of names is a dirty way, but it seems to be the solution.