|
The problem is, i want to keep the fish material and just add the animation shaders to it. As long as I just put a MaterialGroup above each clone, i can add a seperate shader each but i lose the fish texture and so on. When I extract the fish material and add the shader to that material, all fish of one kind have the same material again.
There is another thing im struggling with, as long as
i used just one MaterialGroup above all fish, with a shader assigned to it that
was defined globally and altered in the display routine it worked fine: vertProg = VertexProgramChunk::create(); vertProg->read("data/fish_ani.vp"); endEditCP(vertProg); Real32 t = osgsin(time/1000.f)*7; beginEditCP(vertProg, ProgramChunk::ParamNamesFieldMask); vertProg->setParameter((short int)0, Vec4f(t,0,0,0)); vertProg->setParameter((short int)4, Vec4f(2.2,0,0,0)); endEditCP(vertProg,
ProgramChunk::ParamNamesFieldMask); fishType type; TransformPtr transCore; NodePtr matNode; VertexProgramChunkPtr vert; FragmentProgramChunkPtr frag; }; vector<sFish> fish; vertProg = VertexProgramChunk::create(); vertProg->read("data/fish_ani.vp"); endEditCP(vertProg); |
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
