Hi,<br><br>I am trying to cast shadows on textured surfaces. I use VTK 5.6 and the test code found in the package: TestShadowMapPass.cxx.<br>The original program works well, the shadows of the objects appear on the surface. However, when I add texture to the rectangle, shadows disappear.<br>
I added the following lines to the original code:<br><br>vtkSmartPointer<vtkImageReader2> floorReader = vtkSmartPointer<vtkPNGReader>::New();<br>vtkSmartPointer<vtkTexture> floorTexture;<br>floorReader->SetFileName(TEXTUREFILE);<br>
floorTexture = vtkSmartPointer<vtkTexture>::New();<br>floorTexture->InterpolateOn();<br>floorTexture->RepeatOn();<br>floorTexture->SetInput(floorReader->GetOutput());<br>rectangleActor->SetTexture(floorTexture);<br>
rectangleActor->GetProperty()->SetDiffuseColor(0.75, 0.75, 0.75);<br><br>What is the correct way to visualize both textures and shadows in VTK?<br>Thanks for your help in advance.<br><br>Best regards,<br>Zsolt<br><br>