diff options
author | Ton Roosendaal <ton@blender.org> | 2006-10-14 14:21:19 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-10-14 14:21:19 +0400 |
commit | e868f223dcef75ef7ea7e6df1e1e02ef0cc97d83 (patch) | |
tree | 1c33808c7a63d21747646e2c278ce9926b7226a8 /source/blender/render/intern/include/zbuf.h | |
parent | babb95c3e0a5e9c87fa3f402d5b8ce90eb440346 (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/zbuf.h')
-rw-r--r-- | source/blender/render/intern/include/zbuf.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h index 1ec682c2162..ebad8f241f7 100644 --- a/source/blender/render/intern/include/zbuf.h +++ b/source/blender/render/intern/include/zbuf.h @@ -54,8 +54,9 @@ void convert_zbuf_to_distbuf(struct RenderPart *pa, struct RenderLayer *rl); typedef struct APixstr { unsigned short mask[4]; /* jitter mask */ - int z[4]; /* distance */ - int p[4]; /* index */ + int z[4]; /* distance */ + int p[4]; /* index */ + short shadfac[4]; /* optimize storage for irregular shadow */ struct APixstr *next; } APixstr; @@ -81,6 +82,7 @@ typedef struct ZSpan { struct ListBase *apsmbase; int polygon_offset; /* offset in Z */ + float shad_alpha; /* copy from material, used by irregular shadbuf */ int mask, apsmcounter; /* in use by apixbuf */ void (*zbuffunc)(struct ZSpan *, int, float *, float *, float *, float *); @@ -88,10 +90,14 @@ typedef struct ZSpan { } ZSpan; -/* exported for evil edge render... */ +/* exported to shadbuf.c */ +void zbufclip4(struct ZSpan *zspan, int zvlnr, float *f1, float *f2, float *f3, float *f4, int c1, int c2, int c3, int c4); +void zbuf_free_span(struct ZSpan *zspan); + +/* exported to edge render... */ void zbufclip(struct ZSpan *zspan, int zvlnr, float *f1, float *f2, float *f3, int c1, int c2, int c3); -void zbuf_alloc_span(ZSpan *zspan, int rectx, int recty); -void zbufclipwire(ZSpan *zspan, int zvlnr, struct VlakRen *vlr); +void zbuf_alloc_span(struct ZSpan *zspan, int rectx, int recty); +void zbufclipwire(struct ZSpan *zspan, int zvlnr, struct VlakRen *vlr); #endif |