I have been playing around with CG shading in VTK . Basically I tried to shade a vtkCubeSource and provide an xml file with the Material Information.<br>So I grab the vtkProperty of the actor and Load the material using the LoadMaterial() function.<br>
<br>I tried the <a href="http://fragment.cg">fragment.cg</a> program which will add diffuse ambient and specular color to the cubesource . <br>My problem is with the VTk interactor style being used .<br><br>When I have the setting to TrackballCamera, the CG shading works as expected, with the camera and light moving in unison. <br>
But if i switch to TrackballActor, it seems that the light source and the actor both are moving which seems odd . <br><br>Is that how the CG shader is supposed to work ?<br><br>Regards<br>DArshan<br>