Quote:the model no longer animates!
that means that the animation was in the old shader, and that you dont use animation in the new shader
Ok... now that has just completly confused me
How is the animation in the shader? How do I get the chr to be animated but render with a custom shader?
Here is how I am trying atm:
Game::ObjParams obj; // create object parameters variable
obj.type(true,"OBJ_CHR");
obj.sortParams();
obj.mesh(true,Meshs(S+spawnFile+".mesh"));
for (int p=0;p<obj.mesh()->parts();p++)
{
for (int mi=0;mi<4;mi++)
{
if (obj.mesh()->part(p).material[mi]) obj.mesh()->part(p).material[mi]->user_shader = SHD_COLORMAP;
}
}
obj.mesh()->setShader();
Phys *phys = new Phys(1);
phys->part(0).create(Capsule(0.2,1));
obj.phys(true,phys);
Game::Obj *spawnObj = Game::World.objCreateNear(obj,Matrix(obj.scale(),spawnPos));
This is setting the shader correctly.. but w/o animation...