Wintermute Engine > Feature requests, suggestions

Shader control request.

(1/1)

cremen:
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: ---float4 BorderColor = { 1.0, 0.0, 0.0, 0.7 };
float BorderWidth = 4.0;

texture g_MeshTexture<
    string ResourceName = "actors\\inga\\inga.jpg";
>;

--- End code ---

Kinjal:
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.

Navigation

[0] Message Index

Go to full version