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
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-10-14 14:21:19 +0400
committerTon Roosendaal <ton@blender.org>2006-10-14 14:21:19 +0400
commite868f223dcef75ef7ea7e6df1e1e02ef0cc97d83 (patch)
tree1c33808c7a63d21747646e2c278ce9926b7226a8 /source/blender/render/intern/include/render_types.h
parentbabb95c3e0a5e9c87fa3f402d5b8ce90eb440346 (diff)
New shadow feature: Irregular Shadow Buffers
Full log: http://www.blender3d.org/cms/Irregular_Shadow_Buffe.785.0.html In short: this is a shadow buffer approach that always results in crispy shadows, independent of lamp buffer size or zoom level. This shadow buffer system also supports transparent shadow. This is part of work on refreshing Shadow Buffers in Blender. You now can choose of two types (Classical, Irregular). More types will follow. Also quality issues for Classical shadow buffers are going to be reviewed, especially to solve the lousy Biasing. For the CVS log record; it is based on articles: Gregory Johnson et al, University of Texas, Austin. (Regular grid method). Timo Aila and Samuli Laine, Helsinki University of Technology. (BSP method).
Diffstat (limited to 'source/blender/render/intern/include/render_types.h')
-rw-r--r--source/blender/render/intern/include/render_types.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 5ff00e7a72c..a429e3027cd 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -49,7 +49,7 @@ struct GHash;
#define TABLEINITSIZE 1024
#define LAMPINITSIZE 256
/* hardcoded maximum now, for optimize tables */
-#define MAX_THREADS 2
+#define RE_MAXTHREAD 2
typedef struct SampleTables
{
@@ -188,6 +188,8 @@ struct Render
/* ------------------------------------------------------------------------- */
+struct ISBData;
+
typedef struct ShadSampleBuf {
struct ShadSampleBuf *next, *prev;
long *zbuf;
@@ -195,6 +197,7 @@ typedef struct ShadSampleBuf {
} ShadSampleBuf;
typedef struct ShadBuf {
+ /* regular shadowbuffer */
short samp, shadhalostep, totbuf;
float persmat[4][4];
float viewmat[4][4];
@@ -204,6 +207,9 @@ typedef struct ShadBuf {
int co[3];
int size, bias;
ListBase buffers;
+
+ /* irregular shadowbufer, result stored per thread */
+ struct ISBData *isb_result[RE_MAXTHREAD];
} ShadBuf;
/* ------------------------------------------------------------------------- */
@@ -304,8 +310,10 @@ typedef struct LampRen
short samp;
/** Softness factor for shadow */
float soft;
- /** amount of subsample buffers */
+ /** amount of subsample buffers and type of filter for sampling */
short buffers, filtertype;
+ /** shadow buffer type (regular, irregular) */
+ short buftype;
/** autoclip */
short bufflag;
/** shadow plus halo: detail level */
@@ -339,7 +347,7 @@ typedef struct LampRen
short YF_glowtype;
/* ray optim */
- VlakRen *vlr_last[MAX_THREADS];
+ VlakRen *vlr_last[RE_MAXTHREAD];
struct MTex *mtex[MAX_MTEX];
} LampRen;