4 ms·
It's written in GLSL which is a C like language for shaders designed to be executed on the GPU. The 2D vector used for input is to represent pixel coordinates
by tiborsaas 6y ago
It's written in GLSL which is a C like language for shaders designed to be executed on the GPU.
The 2D vector used for input is to represent pixel coordinates mapped from 0 to 1 or -1 to 1 on both axes.
The magic numbers are nothing special, they are just large numbers to make the result unpredictable for the given input.
The top level function is a fract which takes the fractional part of a number. So if the result of the inner computation is twisted enough it will be hard to trace it back to the original values. There are lots of variations for these one liners, most of the do a great job to produce noise.