Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-06-17 01:56:49 +0400
committerTon Roosendaal <ton@blender.org>2005-06-17 01:56:49 +0400
commit5fac7965c26915f4ab90559bdd756dc204a70b46 (patch)
treee51e7d522891e3704e9f6d7522e076ae6bb33f54 /source
parent49d38efe7e3e700d057bacc9525294192328f21c (diff)
Bug #2751
Recurring issue, but also bug in 2.37/37a: OSA sample amount versus AO sample amount conflict... if AO and OSA amounts were exact equal it gives black spots. Solution not optimal yet... but at least looks good. Still think it's useless to sample fewer than AO level 8 (64), but nevertheless. :)
Diffstat (limited to 'source')
-rw-r--r--source/blender/render/intern/source/ray.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/ray.c b/source/blender/render/intern/source/ray.c
index 23f9c2121ee..e870379da25 100644
--- a/source/blender/render/intern/source/ray.c
+++ b/source/blender/render/intern/source/ray.c
@@ -2003,7 +2003,7 @@ void ray_ao(ShadeInput *shi, World *wrld, float *shadfac)
Isect isec;
float *vec, *nrm, div, bias, sh=0;
float maxdist = wrld->aodist;
- int j=0, tot, actual=0, skyadded=0;
+ int j= -1, tot, actual=0, skyadded=0;
isec.vlrorig= shi->vlr;
isec.vlr_last= NULL;
@@ -2081,7 +2081,8 @@ void ray_ao(ShadeInput *shi, World *wrld, float *shadfac)
vec+= 3;
}
- shadfac[3] = 1.0 - sh/((float)actual);
+ if(actual==0) shadfac[3]= 1.0;
+ else shadfac[3] = 1.0 - sh/((float)actual);
if(wrld->aocolor!=WO_AOPLAIN && skyadded) {
div= shadfac[3]/((float)skyadded);