I have written a custom shader program that I would like to apply on my node to distort the sprite attached on my node.
I called the line below to set the program on the node in the script attached to the node:
This works, and when I play the project on the Browser I can see my shader program activated on the node. But in the Cocos Creator editor it still shows the normal undistorted sprite. How do I get the editor to redraw the node with the shader applied on it? What if I need to animate the shader effect on the editor with a variable passed in from the node’s property?
I see this in the Creator code:
but am not sure how to use it to trigger a redraw on the editor. Can anybody please help?