[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12351] trunk/blender/source/blender/ render/intern/source/rayshade.c: * Fix for bug #7633: SSS makes QMC crash
Matt Ebb
matt at mke3.net
Tue Oct 23 05:13:36 CEST 2007
Revision: 12351
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12351
Author: broken
Date: 2007-10-23 05:13:34 +0200 (Tue, 23 Oct 2007)
Log Message:
-----------
* Fix for bug #7633: SSS makes QMC crash
This occurred when using qmc shadows, full OSA, and sss - it was
assuming full OSA was being used, even when (during the SSS prepass)
osa is set to 0.
Fixed by tightening up the checks for full OSA.
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/rayshade.c
Modified: trunk/blender/source/blender/render/intern/source/rayshade.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/rayshade.c 2007-10-23 01:52:26 UTC (rev 12350)
+++ trunk/blender/source/blender/render/intern/source/rayshade.c 2007-10-23 03:13:34 UTC (rev 12351)
@@ -1662,7 +1662,7 @@
float adapt_thresh = lar->adapt_thresh;
int max_samples = lar->ray_totsamp;
float pos[3];
- int do_soft=1;
+ int do_soft=1, full_osa=0;
colsq[0] = colsq[1] = colsq[2] = 0.0;
if(isec->mode==RE_RAY_SHADOW_TRA) {
@@ -1671,8 +1671,9 @@
shadfac[3]= 1.0f;
if (lar->ray_totsamp < 2) do_soft = 0;
-
- if (shi->vlr->flag & R_FULL_OSA) {
+ if ((R.r.mode & R_OSA) && (R.osa > 0) && (shi->vlr->flag & R_FULL_OSA)) full_osa = 1;
+
+ if (full_osa) {
if (do_soft) max_samples = max_samples/R.osa + 1;
else max_samples = 1;
} else {
@@ -1702,7 +1703,7 @@
* based on the pre-generated OSA texture sampling offsets,
* for anti-aliasing sharp shadow edges. */
VECCOPY(pos, shi->co);
- if (shi->vlr && ((shi->vlr->flag & R_FULL_OSA) == 0)) {
+ if (shi->vlr && !full_osa) {
QMC_sampleRect(jit, qsa_jit, shi->thread, samples, 1.0, 1.0);
pos[0] += shi->dxco[0]*jit[0] + shi->dyco[0]*jit[1];
More information about the Bf-blender-cvs
mailing list