Not 100% sure how this should work, since GLSL doesn't support arbitrary length lists, non static for loops, or recursion. Might have to do some compile time magic, could be really cool to look into introducing dependent types, generic programming, or macros.
For example the implementation of fractal brownian motion in the standard library, I've manually written out what could be a for loop. It'd be cool if we had a construct that would automatically compile into static code like this.
This will be particularly important for adding sources that need to calculate some "escape iteration" like Mandelbrot fractals
Not 100% sure how this should work, since GLSL doesn't support arbitrary length lists, non static for loops, or recursion. Might have to do some compile time magic, could be really cool to look into introducing dependent types, generic programming, or macros.
For example the implementation of fractal brownian motion in the standard library, I've manually written out what could be a for loop. It'd be cool if we had a construct that would automatically compile into static code like this.
This will be particularly important for adding sources that need to calculate some "escape iteration" like Mandelbrot fractals