do you have a shadertoy version of this for comparison?
i took this one by ozzy https://www.shadertoy.com/view/lsSGWw
and tweaked a few things by hand for optimization. saved a few cycles on the code and increased the iterations to 13, which gives a better result.
I can't get your example code to work, but that is a completely different technique, ray marching a volume displaced by a noise function. This gives nice 3D-looking flames, but the movement tends to look like a scrolling noise function. And it's harder to use arbitrary burning shapes, my simulation supports drawing anything and it will burn.
Sorry, this version wont just paste back as is in shadertoy. Also it needs a random 256x256 bitmap in channel 0. The effect is the same as ozzy's original, except change ITERATIONS to 13 in his code to see the change (which is only slightly better). The other changes were for performance, which i improved slightly.
i took this one by ozzy https://www.shadertoy.com/view/lsSGWw and tweaked a few things by hand for optimization. saved a few cycles on the code and increased the iterations to 13, which gives a better result.
like this:
#define ITERATIONS 13.0 #define SPEED 10.0 #define DISPLACEMENT 0.05 #define YOFFSET 0.1 #define YSCALE 0.25 #define FLAMETONE vec3(50.0, 5.0, 1.0)