We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Is there a way to have different shaders for different shapes? Or does any shader apply to any rendered shape?
a shader is applied to all subsequent shapes until a new shader is set, or the default shader is re-enabled with resetShader():
shader(sh1); shape(obj1); shader(sh2); shape(obj2); resetShader(); shape(obj3);
shader sh1 will render shape obj1, sh2 will render obj2, and the default shader will render obj3.
Answers
a shader is applied to all subsequent shapes until a new shader is set, or the default shader is re-enabled with resetShader():
shader sh1 will render shape obj1, sh2 will render obj2, and the default shader will render obj3.