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/shadbuf.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/shadbuf.h')
-rw-r--r--source/blender/render/intern/include/shadbuf.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/source/blender/render/intern/include/shadbuf.h b/source/blender/render/intern/include/shadbuf.h
index 8258dea466f..8b786c6e098 100644
--- a/source/blender/render/intern/include/shadbuf.h
+++ b/source/blender/render/intern/include/shadbuf.h
@@ -61,6 +61,50 @@ float testshadowbuf(struct ShadBuf *shb, float *rco, float *dxco, float *dyco, f
*/
float shadow_halo(LampRen *lar, float *p1, float *p2);
+/**
+ * Irregular shadowbuffer
+ */
+
+struct MemArena;
+struct APixstr;
+
+void ISB_create(RenderPart *pa, struct APixstr *apixbuf);
+void ISB_free(RenderPart *pa);
+float ISB_getshadow(ShadeInput *shi, ShadBuf *shb);
+
+/* data structures have to be accessible both in camview(x, y) as in lampview(x, y) */
+/* since they're created per tile rendered, speed goes over memory requirements */
+
+
+/* buffer samples, allocated in camera buffer and pointed to in lampbuffer nodes */
+typedef struct ISBSample {
+ float zco[3]; /* coordinate in lampview projection */
+ short *shadfac; /* initialized zero = full lighted */
+ int facenr; /* index in faces list */
+} ISBSample;
+
+/* transparent version of buffer sample */
+typedef struct ISBSampleA {
+ float zco[3]; /* coordinate in lampview projection */
+ short *shadfac; /* NULL = full lighted */
+ int facenr; /* index in faces list */
+ struct ISBSampleA *next; /* in end, we want the first items to align with ISBSample */
+} ISBSampleA;
+
+/* used for transparent storage only */
+typedef struct ISBShadfacA {
+ struct ISBShadfacA *next;
+ int facenr;
+ float shadfac;
+} ISBShadfacA;
+
+/* What needs to be stored to evaluate shadow, for each thread in ShadBuf */
+typedef struct ISBData {
+ short *shadfacs; /* simple storage for solid only */
+ ISBShadfacA **shadfaca;
+ struct MemArena *memarena;
+ int minx, miny, rectx, recty; /* copy from part disprect */
+} ISBData;
#endif /* SHADBUF_EXT_H */