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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-10-12 17:32:28 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-10-12 17:32:28 +0400
commit96e9debe1fbfcd114abf2c78b00a3a690ad205b6 (patch)
tree4f54f063e251cae0927968ddcbbd04e9d56d6f11 /source/blender/render
parent23a02bbead6d423bba1226bd84d4b2248af7ad39 (diff)
- Fix for bug #17825: baking SSS is not supported, but it didn't give
proper results, should bake as if SSS was disabled. - Fix for GLSL to handle failing shadow buffer creation better. - Fix for sky/atmosphere version patch, was not doing files from 2.46 and newer.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/include/sss.h2
-rw-r--r--source/blender/render/intern/source/shadeoutput.c6
-rw-r--r--source/blender/render/intern/source/sss.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/render/intern/include/sss.h b/source/blender/render/intern/include/sss.h
index 660fb544227..9ffdcaf206a 100644
--- a/source/blender/render/intern/include/sss.h
+++ b/source/blender/render/intern/include/sss.h
@@ -59,7 +59,7 @@ void sss_add_points(Render *re, float (*co)[3], float (*color)[3], float *area,
void free_sss(struct Render *re);
int sample_sss(struct Render *re, struct Material *mat, float *co, float *col);
-int has_sss_tree(struct Render *re, struct Material *mat);
+int sss_pass_done(struct Render *re, struct Material *mat);
#endif /*SSS_H*/
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index c4fac1aeb06..4c627056c1d 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1568,7 +1568,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
shr->col[2]= shi->b*shi->alpha;
shr->col[3]= shi->alpha;
- if((ma->sss_flag & MA_DIFF_SSS) && !has_sss_tree(&R, ma)) {
+ if((ma->sss_flag & MA_DIFF_SSS) && !sss_pass_done(&R, ma)) {
if(ma->sss_texfac == 0.0f) {
shi->r= shi->g= shi->b= shi->alpha= 1.0f;
shr->col[0]= shr->col[1]= shr->col[2]= shr->col[3]= 1.0f;
@@ -1722,7 +1722,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
shr->alpha= shi->alpha;
/* from now stuff everything in shr->combined: ambient, AO, radio, ramps, exposure */
- if(!(ma->sss_flag & MA_DIFF_SSS) || !has_sss_tree(&R, ma)) {
+ if(!(ma->sss_flag & MA_DIFF_SSS) || !sss_pass_done(&R, ma)) {
shr->combined[0]+= shi->ambr;
shr->combined[1]+= shi->ambg;
shr->combined[2]+= shi->ambb;
@@ -1772,7 +1772,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
/* modulate by the object color */
if((ma->shade_flag & MA_OBCOLOR) && shi->obr->ob) {
- if(!(ma->sss_flag & MA_DIFF_SSS) || !has_sss_tree(&R, ma)) {
+ if(!(ma->sss_flag & MA_DIFF_SSS) || !sss_pass_done(&R, ma)) {
float obcol[4];
QUATCOPY(obcol, shi->obr->ob->col);
diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c
index e41c7c38069..2e7ca48affc 100644
--- a/source/blender/render/intern/source/sss.c
+++ b/source/blender/render/intern/source/sss.c
@@ -1023,8 +1023,8 @@ int sample_sss(Render *re, Material *mat, float *co, float *color)
return 0;
}
-int has_sss_tree(struct Render *re, struct Material *mat)
+int sss_pass_done(struct Render *re, struct Material *mat)
{
- return (re->sss_hash && BLI_ghash_lookup(re->sss_hash, mat));
+ return ((re->flag & R_BAKING) || (re->sss_hash && BLI_ghash_lookup(re->sss_hash, mat)));
}