|
![](/i/fill.gif) |
In article <386E7D29.2BAD5F3B@xenoarch.com>, Matthew Corey Brown
<mcb### [at] xenoarch com> wrote:
> First Thing, yes using patterns directly would be slightly faster
> by removing per lookup approximately
>
> 10 multipulcations / divisions
> 5 add/subs
> 2 compares
> 1 or 2 function calls
>
> (this is done from my color conversion so you can use red/green hf
> images, and blending of colors of evalpigment, this is off the top of my
> head so
> for sake of argument lets triple these numbers)
>
> How ever most patterns use noise which is a couple of magnitudes of more
> adds and muls.
>
> so depending on how much turbulence and which pattern you gain anywhere
> from 0.01% to 50% gain, the 50% gain is if you use gradient with
> no turbulence, might as well use y-floor(y) and possibly get an even
> faster speed gain. but i would stay 99% of the functions the speed gain
> would be less then %1
Hmm, are you sure the numbers would be that small? Per call, perhaps,
but how many times are those functions used? I suppose the only way to
get a real answer would be to add the function and run some tests. Does
anyone have some hints on adding an isosurface function?
> note on precision: colors do use floats, but some compilers reduce
> doubles
> to floats when they are told todo fast math, personally i compile
> without fast math.
Well, when I said that, I was thinking about the precision of the color
blending code, which I don't understand at all.
> without the source in front of me i'm not sure if eval pattern does the
> turbulence or not
I am fairly certain it does, as well as the other warps and transforms.
As I remember, those are handled in Eval_TPat(), and my patch is
basically an interface to this function.
I am having school break now, and just got back from checking out a
possible new job(pulling traps at a target shooting range nearby), so I
will have some free time. I will take a closer look at that color_map
code, I have been putting that off long enough.
--
Chris Huff
e-mail: chr### [at] yahoo com
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
![](/i/fill.gif) |