I have these existing implementations for laplacian and bilaplacian and they work great, but are fixed-size (basically the smallest-possible) and don't have any weighting because I guess that's close-to-meaningless for the smallest-possible neighborhood?:
vec3 laplacian = ( a_n + a_e + a_s + a_w - 4.0 * a ) / ( h * h );
vec3 bilaplacian = ( a_n2 + a_e2 + a_s2 + a_w2 + 2.0 * ( a_ne + a_se + a_sw + a_nw ) - 8.0 * ( a_n + a_e + a_s + a_w ) + 20.0 * a ) / ( h * h * h * h );
I already have a 'laplaceSize' function that I can pass a size to, to get a larger neighborhood - it iterates in 2D over the cells that are covered by the specified half-width, and weights them with a smoothstep. Works great, but I want a bi-laplacian equivalent.
So far I haven't been able to work out how to do an arbitrarily-sized bi-laplacian for the life of me! I'd really like to have one though because I'd like to use it in my playful KSE (Kuramoto Sivashinsky Equation) experiments.
If anyone's keen to help, I am happy to send some fun example RD/KSE-simulation glsl shaders that I've been working on (and want to be able to make use a larger neighborhood) that should work in the 'Shader Editor' Android app by Markus Fisch (here's the source but it's also on the App-Store):
https://github.com/markusfisch/ShaderEditor
danwills•5h ago
https://photos.app.goo.gl/NnfjxUwR5ZuH4KkJ6
It's basically KSE but with hue-rotation happening in various-ways so it's really more like 3 separate KSE sims that feed into each other in a cycle. I think it's pretty fun! Happy to share code if it is of interest!