I use AddFragmentShaderReplacement for fragment shader added “uniform sampler2D s”, Can someone tell me how to bind a texture to “sampler2D s” in VTK?
See TestMultiTexturing.cxx for an example. To bind the texture use
actor->GetProperty()->SetTexture(“skyclouds”, tex2);
that will cause the texture to be bound/activated and then unbound/deactivated when that actor is rendered.
Thank you Ken,your answer solved my problem perfectly!