1
Feature requests, suggestions / Shader control request.
« on: October 03, 2009, 08:55:20 AM »
Need a script command for runtime change shader constants. Something like this:
actor.SetShaderConstantVec4( "BorderColor", 1.0, 0.0, 0.0, 0.0 );
actor.SetShaderConstantVec1( "BorderWidth", 5.0 );
actor.SetTexture( "g_MeshTexture", "actors\\fx\\glow12.jpg");
Additionaly needs the shader constant setters in actor definition file. (like texture setting, constant and others)
where constants defined like this:
actor.SetShaderConstantVec4( "BorderColor", 1.0, 0.0, 0.0, 0.0 );
actor.SetShaderConstantVec1( "BorderWidth", 5.0 );
actor.SetTexture( "g_MeshTexture", "actors\\fx\\glow12.jpg");
Additionaly needs the shader constant setters in actor definition file. (like texture setting, constant and others)
where constants defined like this:
Code: [Select]
float4 BorderColor = { 1.0, 0.0, 0.0, 0.7 };
float BorderWidth = 4.0;
texture g_MeshTexture<
string ResourceName = "actors\\inga\\inga.jpg";
>;