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&lt;vtkImageReader2&gt; floorReader = vtkSmartPointer&lt;vtkPNGReader&gt;::New();<br>vtkSmartPointer&lt;vtkTexture&gt; floorTexture;<br>floorReader-&gt;SetFileName(TEXTUREFILE);<br>
floorTexture = vtkSmartPointer&lt;vtkTexture&gt;::New();<br>floorTexture-&gt;InterpolateOn();<br>floorTexture-&gt;RepeatOn();<br>floorTexture-&gt;SetInput(floorReader-&gt;GetOutput());<br>rectangleActor-&gt;SetTexture(floorTexture);<br>
rectangleActor-&gt;GetProperty()-&gt;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>