yafray-devel
[Top][All Lists]
Advanced

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

Re: [Yafray-devel] color implementation, etc.


From: Alejandro Conty Estevez
Subject: Re: [Yafray-devel] color implementation, etc.
Date: Wed, 18 Sep 2002 01:43:45 +0200
User-agent: Mutt/1.3.28i

Sorry for the long waiting ...

> 
> The full spectrum-oriented rendering is must-have :). I will at least 
> try to implement it ;). I have got some books on this topic (and there 
> is always public library). Only thing i want from you (to help me with 
> this): please move r, g, b members to protected section and use set(r, 
> g, b) and constructor with r, g, b args. This will really ease the issue 
> for me :). You can make it inline as the performance is probably 
> critical. I can even create patch if needed :).

Done :-) the version I'm uploading just now 0.0.2-6 has those values
protected, so you can test your representation. Contact me if you have
any problem.

> 
> And one more question: is it possible to use 'long long' type (64bit 
> fixed point number) for color, and if yes, will it improve performance? 

Well, in our current intel arch we don't have those big numbers unless
you use mmx. But in other machines and new intel 64 bit arch you could
use that (if the compiler supports it).

> The fixed-point math is faster AFAIK. You will have to work in mode 

Not always, there are some processors like alpha where float operations
are faster than integer. But on intel yes, it would be faster. but ...

> where 1.0 = 2^64, and this is the only complication i see. Just idea.

... is very dangrous to use a fixed point representation cause you can
lose all the color with low energy elements like photons (very low
energy each photon). But try it, it could work.

put allways preprocesor macros like

#ifdef USE_SPECTRUM
...
#else
...
#endif

I'll put a configure option as soon as you ask for it.





reply via email to

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