Disable SSS better for preview rendering, so it does not slow down

other preview renders at all.

Also added a flag to enable/disable SSS per scene. There is no
button for it yet, the Render panel has no space left .. will find
a place for it later.

The subversion number was also increased to enable the flag for
older .blends.
This commit is contained in:
2007-05-17 16:51:09 +00:00
parent 3c469b88f5
commit 33466557fc
5 changed files with 14 additions and 3 deletions

View File

@@ -283,6 +283,8 @@ static Scene *preview_prepare_scene(RenderInfo *ri, int id_type, ID *id, int pr_
/* turn on raytracing if needed */
if(mat->mode_l & (MA_RAYTRANSP|MA_RAYMIRROR))
sce->r.mode |= R_RAYTRACE;
if(mat->sss_flag & MA_DIFF_SSS)
sce->r.mode |= R_SSS;
/* turn off fake shadows if needed */
/* this only works in a specific case where the preview.blend contains
@@ -314,7 +316,7 @@ static Scene *preview_prepare_scene(RenderInfo *ri, int id_type, ID *id, int pr_
}
}
else {
sce->r.mode &= ~(R_OSA|R_RAYTRACE);
sce->r.mode &= ~(R_OSA|R_RAYTRACE|R_SSS);
}
for(base= sce->base.first; base; base= base->next) {