My shadertoy fbm example has discontinuities, is it the browser or me?

118 views Asked by At

I'm trying to understand GLSL and shaders and have copied an example shader to generate FBM noise and I'm getting discontinuities in the output.

My shader is here: https://www.shadertoy.com/view/mtSGRz

I've copied the example from https://thebookofshaders.com/13/ and reduced it to a single octave and scaled to make the discontinuity visible:

Screenshot of shader output showing discontinuities

I'm not sure if:

a) I'm not understanding the algorithm correctly and this is the expected output (I doubt that though as I thought that the point of FBM noise was it was continuous and differentiable).

b) There's a bug in the code (I expected that when I was trying to implement the algorithm from scratch, but not since I've now just copied the code from The Book of Shaders.)

c) There's a floating point precision (or similar) issue, but it seems this works for other people?

d) It's something buggy on my setup (Chrome 108 on Windows 10, Dell Precision 5530 laptop)

Can anyone point me in the right direction?

0

There are 0 answers