[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13141] branches/soc-2007-joeedh/source/ blender: Commit of working copy for transference to desktop.

Joseph Eagar joeedh at gmail.com
Sat Jan 5 20:15:28 CET 2008


Revision: 13141
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13141
Author:   joeedh
Date:     2008-01-05 20:15:28 +0100 (Sat, 05 Jan 2008)

Log Message:
-----------
Commit of working copy for transference to desktop.

Modified Paths:
--------------
    branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c
    branches/soc-2007-joeedh/source/blender/render/intern/source/shadeoutput.c
    branches/soc-2007-joeedh/source/blender/src/drawview.c

Modified: branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c
===================================================================
--- branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c	2008-01-05 19:11:10 UTC (rev 13140)
+++ branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c	2008-01-05 19:15:28 UTC (rev 13141)
@@ -661,9 +661,7 @@
 
 /*cindex is component index, since all transmittance functions for r, g, and b
   are squased into only one input stream.*/
-DSMFunction *DSM_MergeLayerList(MemArena *arena, _ClrEntry *row, ListBase (*transfuncs)[3], int totface, 
-								char *scratchmem, int scratchlen, float *weight, int samplewid, 
-								float error, int cindex)
+DSMFunction *DSM_MergeLayerList(MemArena *arena, _ClrEntry *row, ListBase (*transfuncs)[3], int totface,char *scratchmem, int scratchlen, float *weight, int samplewid,float error, int cindex)
 {
 	DSMFunction *func;
 	DSMLayerSample *samp;
@@ -684,7 +682,8 @@
 	slope = 0.0;
 	samp=func->samples;
 	for (i=0, csamp=row; i<totface; i++, csamp++, samp++) {
-
+		if (accum < 0.005) break;
+		
 		/*we've hit a sample in one of the other rgb color component
     	  visibility functions, or we've hit an excluded sample, so continue*/
 		if (csamp->index != cindex || !csamp->srclist) {
@@ -954,7 +953,7 @@
 				qsort(row2, totface, sizeof(_ClrEntry), dsmvergzvlak);
 
 				memset(lastsamples, 0, sizeof(void*)*DSM_AASAMPLES*DSM_AASAMPLES);
-				memset(samp_totlayers, 0, sizeof(int)*3*DSM_AASAMPLES*DSM_AASAMPLES);
+				memset(samp_totlayers, 0, sizeof(int)*3*dbuf->max_layers);
 				/*method of processing the input stream:
 				  we indentify and precess subpixel transmittance functions, however
 				  we still leave things in a single stream for efficient processing.
@@ -1044,12 +1043,13 @@
 						printf("EVVVVIIIL! one: %d, two: %d\n", row[a].depth, row[a+1].depth);
 					}
 					
-					for (b=0; b<3; b++) {
+					/*for (b=0; b<3; b++) {
 						if (accum[row[a].samplenr][b] < 0.001 && samp_totlayers[row[a].samplenr][b] < dbuf->max_layers) {
 							samp_totlayers[row[a].samplenr][b] += 1;
 							accum[row[a].samplenr][b] = 1.0f;
 						}
-					}
+					}*/
+					
 					if (accum[row[a].samplenr][0] > 0.001 || accum[row[a].samplenr][1] > 0.001 || accum[row[a].samplenr][2] > 0.001) {
 						float clr[4];
 
@@ -1101,7 +1101,7 @@
 							//clr[0] *= 2.0f;
 						}
 						
-						clr[3] *= 2.0;
+						//clr[3] *= 2.0;
 						for (b=0; b<3; b++) {
 							float fac;
 			

Modified: branches/soc-2007-joeedh/source/blender/render/intern/source/shadeoutput.c
===================================================================
--- branches/soc-2007-joeedh/source/blender/render/intern/source/shadeoutput.c	2008-01-05 19:11:10 UTC (rev 13140)
+++ branches/soc-2007-joeedh/source/blender/render/intern/source/shadeoutput.c	2008-01-05 19:15:28 UTC (rev 13141)
@@ -1058,7 +1058,7 @@
 			if(lar->buftype==LA_SHADBUF_IRREGULAR) {
 				shadfac[0] = shadfac[1] = shadfac[2] = ISB_getshadow(shi, lar->shb);
 			} else if (lar->buftype==LA_SHADBUF_DEEP) {
-				if (G.rt != 51) {
+				if (G.rt == 51) {
 					DSM_getSoftShadow(lar->shb, shi, lar, shi->co, shi->dxco, shi->dyco, inp, shadfac);
 				} else {
 					shadfac[0] = DSM_getShadow(lar->shb, shi->co, shi->dxco, shi->dyco, inp, 0);

Modified: branches/soc-2007-joeedh/source/blender/src/drawview.c
===================================================================
--- branches/soc-2007-joeedh/source/blender/src/drawview.c	2008-01-05 19:11:10 UTC (rev 13140)
+++ branches/soc-2007-joeedh/source/blender/src/drawview.c	2008-01-05 19:15:28 UTC (rev 13141)
@@ -2774,7 +2774,7 @@
 	}
 }
 
-#define MAXDRAWF	8096*1024
+#define MAXDRAWF	2048
 
 static float draw_array[MAXDRAWF][3];
 static float color_array[MAXDRAWF][3];





More information about the Bf-blender-cvs mailing list