Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Shader control request.  (Read 2948 times)

0 Members and 1 Guest are viewing this topic.

cremen

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 26
    • View Profile
    • Pink Town
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:
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";
>;
Logged

Kinjal

  • WME Kinjal Edition Developer
  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 53
    • View Profile
Re: Shader control request.
« Reply #1 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.
Logged
 

Page created in 0.108 seconds with 22 queries.