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-11-08 21:47:38 +0300
committerTon Roosendaal <ton@blender.org>2006-11-08 21:47:38 +0300
commitcea2b6752bc1f68b829cd24f7611263a98edc897 (patch)
tree647ef326afe5d5188ed80ea921c5d440e11fb97e
parenta65fc1e38177c05854c7a8d879d6526204f35a7b (diff)
Bugfix #5188
Material type OnlyShadow didn't work yet for irregular shadow buffer.
-rw-r--r--source/blender/render/intern/source/rendercore.c5
-rw-r--r--source/blender/render/intern/source/shadbuf.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index fb93db8cf93..686c5061b22 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -1762,7 +1762,10 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
i= 1.0f;
else {
if(lar->shb) {
- i = testshadowbuf(lar->shb, shi->co, shi->dxco, shi->dyco, inp);
+ if(lar->buftype==LA_SHADBUF_IRREGULAR)
+ i= ISB_getshadow(shi, lar->shb);
+ else
+ i = testshadowbuf(lar->shb, shi->co, shi->dxco, shi->dyco, inp);
}
else {
float shad[4];
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index f5a6cebd492..382927680b4 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -553,6 +553,10 @@ float testshadowbuf(ShadBuf *shb, float *rco, float *dxco, float *dyco, float in
int xs, ys, zs, bias, *rz;
short a, num;
+ /* crash preventer */
+ if(shb->buffers.first==NULL)
+ return 1.0f;
+
if(inp <= 0.0f) return 0.0f;
/* rotate renderco en osaco */