Hi guys & gals,
I'am trying to overcome the following issue and need some assistance:
My game relies alot of changing colours/shader settings of objects on the fly. I'am currently using imposters where possible to improve performance.
Currently, setting a shader setting on the object relays to all imposters.
My Question:
- Is there any way to set unique shader properties (eg: iShaderFloatSet(SM_TIREB,"cEmissive",2) to an imposter?
or
- Is there some way of making the imposter an object in its own right so it can be set by iShaderFloatSet(obj_imposter) etc?
I've tried using iShaderFloatSet(SM_TIREB[0]... and (0) with no luck.
Heres my example code:
Anyone who can shed some light on this, i would be greatful!
Cheers
I'am trying to overcome the following issue and need some assistance:
My game relies alot of changing colours/shader settings of objects on the fly. I'am currently using imposters where possible to improve performance.
Currently, setting a shader setting on the object relays to all imposters.
My Question:
- Is there any way to set unique shader properties (eg: iShaderFloatSet(SM_TIREB,"cEmissive",2) to an imposter?
or
- Is there some way of making the imposter an object in its own right so it can be set by iShaderFloatSet(obj_imposter) etc?
I've tried using iShaderFloatSet(SM_TIREB[0]... and (0) with no luck.
Heres my example code:
Code: [Select]
//Create the imposter
iObjectImpostersCreate(SM_TIREB,1);
//Set imposter loc/rot
iObjectImposterSet(SM_TIREB,0,q_bike,v3_bike);
//Set object shader
iShaderFloatSet(SM_TIREB,"cEmissive",2);
//Set unique imposter shader
iShaderFloatSet(SM_TIREB?????,"cEmissive",1);
Anyone who can shed some light on this, i would be greatful!
Cheers