|
![](/i/fill.gif) |
On 29-Dec-08 23:58, Warp wrote:
> clipka <nomail@nomail> wrote:
>> So yes, that should do: A loop typically taking less than two iterations (the
>> most expensive part probably being the RNG) and a square root. Quite
>> inexpensive after all.
>
> When you project the point to the hemisphere, you'll probably need three
> multiplications and a square root. That's going to be much more expensive
> than the RNG. (High-quality RNGs are very fast. They are faster than a LCG,
> which consists of one integer multiplication and addition.)
but sin and cos are (much?) more costly than sqrt and multiplication is
comparatively negligible.
Post a reply to this message
|
![](/i/fill.gif) |