[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53195] trunk/blender/source/blender/ render/intern/source/multires_bake.c: must use permutation table
Morten Mikkelsen
mikkelsen7 at gmail.com
Thu Dec 20 06:03:08 CET 2012
Revision: 53195
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53195
Author: mmikkelsen
Date: 2012-12-20 05:03:00 +0000 (Thu, 20 Dec 2012)
Log Message:
-----------
must use permutation table
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/multires_bake.c
Modified: trunk/blender/source/blender/render/intern/source/multires_bake.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/multires_bake.c 2012-12-20 03:56:22 UTC (rev 53194)
+++ trunk/blender/source/blender/render/intern/source/multires_bake.c 2012-12-20 05:03:00 UTC (rev 53195)
@@ -1129,8 +1129,8 @@
/* use N-Rooks to distribute our N ray samples across
* a multi-dimensional domain (2D)
*/
- const unsigned short I = ao_random_table_1[(i + perm_offs) % ao_data->number_of_rays];
- const unsigned short J = ao_random_table_2[i];
+ const unsigned short I = ao_data->permutation_table_1[(i + perm_offs) % ao_data->number_of_rays];
+ const unsigned short J = ao_data->permutation_table_2[i];
const float JitPh = (get_ao_random2(I + perm_offs) & (MAX_NUMBER_OF_AO_RAYS-1))/((float) MAX_NUMBER_OF_AO_RAYS);
const float JitTh = (get_ao_random1(J + perm_offs) & (MAX_NUMBER_OF_AO_RAYS-1))/((float) MAX_NUMBER_OF_AO_RAYS);
@@ -1141,7 +1141,7 @@
* weighted distribution relative to the north pole.
*/
float SiPhi = sqrt(SiSqPhi);
- float CoPhi = SiSqPhi < 1.0f ? sqrtf(1.0f - SiSqPhi) : 1.0f - SiSqPhi;
+ float CoPhi = SiSqPhi < 1.0f ? sqrtf(1.0f - SiSqPhi) : 0;
float CoThe = cos(Theta);
float SiThe = sin(Theta);
More information about the Bf-blender-cvs
mailing list