[Bf-committers] Dithering

Ton Roosendaal ton at blender.org
Mon Nov 1 18:50:04 CET 2004


Hi,

> I'm not sure I understand. What's not needed? As you
> say, BLI_frand() returns values between 0 and 1. On
> the other hand, BLI_frand()*2.0-1.0 returns values
> between -1 and 1. IMO, it's better to use a signed
> noise for the dithering.

Ah, I noted that down the cvs log, but then it should actually be;

	BLI_frand() - 0.5

Just to have a good standard meaning for slider value '1.0'. Slider can  
go to 2.0 for exaggerated noise of course.
But then new checks have to be added for underflows. I can verify it.

BTW: you also declared variables in the middle of the code, not  
acceptable for C. :)

-Ton-

------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list