How to create waves in shader?
Cocos
APRIL 23, 2024
I have a sprite (a regular line) and I wanted to apply a wave effect to it. I tried to normalize by passing the dimensions of the sprite (line) to the shader like this mat.setProperty("iRsolutetion", new Vec2(1.0 / this.node.getComponent(UITransform).contentSize.width, this task tormented me. it doesn’t work properly.
Let's personalize your content