Title: shader project - glsl DE function collection Post by: cKleinhuis on June 09, 2015, 12:26:24 AM hi all, my shader project has undergone the first few steps, what i have so far is a include/interface include mechanism that generates include opportunities based on implemented interfaces :D
and a parameter edit mechanism similar to fragmentarium/synthclipse for vector and float parameters so far so good, now i would like to build up a collection of DE functions for the classic fractals, what are the latest and most efficient glsl (webglsl) implementations for mandelbulb/mandelbox ? :hmh: :-* Title: Re: shader project - glsl DE function collection Post by: marius on June 09, 2015, 06:31:31 AM hi all, my shader project has undergone the first few steps, what i have so far is a include/interface include mechanism that generates include opportunities based on implemented interfaces :D and a parameter edit mechanism similar to fragmentarium/synthclipse for vector and float parameters so far so good, now i would like to build up a collection of DE functions for the classic fractals, what are the latest and most efficient glsl (webglsl) implementations for mandelbulb/mandelbox ? :hmh: :-* I collected a pile of complete shaders over the years (not just DE) in https://code.google.com/p/boxplorer2/source/browse/#svn%2Ftrunk%2Fcfgs%253Fstate%253Dclosed (https://code.google.com/p/boxplorer2/source/browse/#svn%2Ftrunk%2Fcfgs%253Fstate%253Dclosed) For instance here https://code.google.com/p/boxplorer2/source/browse/trunk/cfgs/boxplorer/fragment.glsl#49 (https://code.google.com/p/boxplorer2/source/browse/trunk/cfgs/boxplorer/fragment.glsl#49) is Rrrola's old DE for mandelbox. But that's full glsl, some minor discrepancies with webgl might exist. This old glslsandbox one has a bunch of them nicely listed and webgl ready: http://glsl.herokuapp.com/e#1843.1 (http://glsl.herokuapp.com/e#1843.1) Title: Re: shader project - glsl DE function collection Post by: laser blaster on June 09, 2015, 07:40:31 AM The fastest Mandelbulb DE functions avoid trig functions, but then you're stuck with a fixed power. I tried the non-trig formula found here https://github.com/niavok/glsl-factory/blob/master/shaders/mandelbulb/f.glsl (https://github.com/niavok/glsl-factory/blob/master/shaders/mandelbulb/f.glsl), and even after a few optimizations, it was only about 20% faster than the default trig versions found in Fragmentarium. So at least for me it's not really worth losing the ability to set the power as a parameter. But maybe it would make more of a difference on older GPU's- I attached the .frag file if you want to try it yourself. Otherwise, the version included in Fragmentarium seems pretty optimal as far as trig formulas go.
Title: Re: shader project - glsl DE function collection Post by: cKleinhuis on June 09, 2015, 11:51:32 AM ah, thank you people, my plan is to extract just the DE functions, equip them with user interfafe slider definitions and ready to go ;) quite a system i am building, dumping all the work in a huge glsl script |