[vtk-developers] Multiple textures

Patrick Bergeron pbergeron at spiria.com
Tue Oct 30 15:10:28 EDT 2018


Hi folks. I sent this a while back on vtk-users but got no response.



I am sending this to vtk-developers because if the features isn't implemented, I will implement it.


I am trying to pass multiple texture buffers to a fragment shader.


I saw I can do:


1) actor->SetTexture(vtkTexture*) takes only a single vtkTexture


2) actor->GetProperty()->SetTexture(int unit, vtkTexture*) takes a texture that I can associate to a texture unit, but those functions are deprecated.


In fact, I think that (2) doesn't even work anymore with the OpenGL2 backend, at least my shader code doesn't seem to be getting them, maybe I am doing something wrong. In any case, I get a vtk warning saying I should not do that.



Some folks have said I should combine multiple images into a single image before sending as a texture image. But I can't do this, because I need to send texture images as well as multiple data (non-image) buffers to the shader as well.


How can I attach multiple image buffers to the actor and/or ogl mapper?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtk-developers/attachments/20181030/d02e7c0b/attachment-0001.html>


More information about the vtk-developers mailing list