[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3d highlights on dark colors

From: Miles Bader
Subject: Re: 3d highlights on dark colors
Date: Tue, 7 Nov 2000 15:34:03 +0900 (JST)

Eli Zaretskii <address@hidden> writes:
> I have a few minor comments:

I've fixed these.  I changed the calculation code to do this instead of
just calling `pow':

              /* How much to change FACTOR to account for BOOST at DIMNESS.  */
              double adjust =
                /* The default value of BOOST is 0.5, which can be
                   calculated about 3 times faster using `sqrt', so
                   optimize that case.  */
                (boost == 0.5 ? sqrt (dimness) : pow (dimness, boost));

That way the default is somewhat faster, but the user can still change it.
[I think the comparison `== 0.5' is ok because 0.5 is exactly
representable on almost any modern system]

The alternative is to just fix BOOST at 0.5, and always use `sqrt',
which would also simply the rest of the code.  The only downside of
doing this is that the user couldn't adjust it, although he could still
adjust the max-limit parameter; I expect that in practice, no one will
adjust either parameter ....


Attachment: dark-boost-1.patch
Description: Patch to boost 3d highlights on dark colors (#2)

Love is a snowmobile racing across the tundra.  Suddenly it flips over,
pinning you underneath.  At night the ice weasels come.  --Nietzsche

reply via email to

[Prev in Thread] Current Thread [Next in Thread]