Suppose I have downloaded a shader file from the internet. Now can I apply that shader effect to a particular region or regions of an object or mesh and not the whole surface of the object / mesh ?
The second question is question can I do the above stated thing while using textures ?
If so, how ?
If the object has been exported as a single geom, then you cannot apply shaders or textures to only part of the object.
If you exported it as two or more separate geoms then you should be able to get at the individual pieces using the find or getChildren functions of NodePath and apply the shader that way.
@teedee: Thank you for your advice.
Or you could create a mask texture and modify the shader to only apply the effect when the texture colour at that texel is white or so.
Hello rdb… you advice seems more appropriate but what is texel or did you mean just “pixel” by that … ?
And can you please show me a link for a tutorial on shader that explains how to do shader masking ?