cache_size yafray parameter calculation changed to sync with current

yafray cvs code. Now given in screen coords (-1,+1)x(-1,+1)
This commit is contained in:
Alejandro Conty Estevez 2004-07-14 10:20:56 +00:00
parent 7a04f91f32
commit 9510c97833
2 changed files with 4 additions and 2 deletions

@ -1257,7 +1257,8 @@ void yafrayFileRender_t::writePathlight()
}
float aspect = 1;
if (R.r.xsch < R.r.ysch) aspect = float(R.r.xsch)/float(R.r.ysch);
float sbase = 2.0*atan(0.5/(mainCamLens/(aspect*32.0)))/float(R.r.xsch);
//float sbase = 2.0*atan(0.5/(mainCamLens/(aspect*32.0)))/float(R.r.xsch);
float sbase = 2.0/float(R.r.xsch);
ostr << " cache=\"on\" use_QMC=\"on\" threshold=\"" <<R.r.GIrefinement<<"\""<<endl;
ostr << " cache_size=\"" << sbase*R.r.GIpixelspersample << "\" shadow_threshold=\"" <<
1.0 - R.r.GIshadowquality << "\" grid=\"82\" search=\"35\" gradient=\"" <<

@ -1272,7 +1272,8 @@ void yafrayPluginRender_t::writePathlight()
}
float aspect = 1;
if (R.r.xsch < R.r.ysch) aspect = float(R.r.xsch)/float(R.r.ysch);
float sbase = 2.0*atan(0.5/(mainCamLens/(aspect*32.0)))/float(R.r.xsch);
//float sbase = 2.0*atan(0.5/(mainCamLens/(aspect*32.0)))/float(R.r.xsch);
float sbase = 2.0/float(R.r.xsch);
params["cache"]=yafray::parameter_t("on");
params["use_QMC"]=yafray::parameter_t("on");
params["threshold"]=yafray::parameter_t(R.r.GIrefinement);