Water ripple effect

#1

I’m trying to make water ripple effect. For that purpose I convert Rippler.as class to haxe (https://github.com/gonzos978/Rippler-Haxe)
It works fine on Flash target but not in html5. I believe it’s somehow related to DisplacementMapFilter but can’t figure it out what’s problem and is it even possible to implement this for html5?

1 Like

#2

i’m not a shader expert, but i think this can be done using shaders. perhaps try to integrate the vertex/pixel shader at https://codepen.io/Blindman67/pen/pwVyVx with the openfl shader (like the example here: https://www.openfl.org/blog/2016/10/11/custom-shaders-audiosource-and-more-openfl-4-3-and-lime-3-3-released/)

perhaps it’s also going to be more efficient, as it doesn’t create extra bitmapdata.

0 Likes