POV-Ray : Newsgroups : povray.bugreports : crand is not thread safe in any >=3.7 version. Do we care? : Re: crand is not thread safe in any >=3.7 version. Do we care? Server Time
26 Sep 2021 20:17:22 EDT (-0400)
  Re: crand is not thread safe in any >=3.7 version. Do we care?  
From: William F Pokorny
Date: 8 Mar 2018 08:18:08
Message: <5aa13810$1@news.povray.org>
On 03/07/2018 10:47 AM, clipka wrote:
> Am 07.03.2018 um 15:18 schrieb William F Pokorny:
>> On 03/07/2018 08:23 AM, William F Pokorny wrote:
>> Use +wt1 if using crand and you want 'frame/view' renders to be the same
>> render to render.
> Maybe we can concoct something that will keep the crand stable when
> using the "+HR" option. While currently only having an effect on
> radiosity, the intention of the switch was to also change the behaviour
> of any other stuff that's affected by thread assignment and render block
> ordering.
> My suggestion would be to re-seed the crand noise generator each time a
> new block is started, maybe using a seed based on the block number in
> order to prevent visible repetitions.


I think using "+HR" here a good idea. Your approach though looks low 
cost cpu wise to me though a more complicated implementation. Maybe fast 
enough the more stable way is how crand could work all the time...

I'll open up a github issue including a pointer back to this thread when 
I get the chance.

Bill P.

Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.