Wintermute Engine Forum

Wintermute Engine => Feature requests, suggestions => Topic started by: cremen on October 03, 2009, 08:55:20 AM

Title: Shader control request.
Post by: cremen 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:
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";
>;
Title: Re: Shader control request.
Post by: Kinjal on December 11, 2009, 09:47:04 AM
I want to try to implement some of those things you asked but I'd need some more info to understand exactly what you mean.