From febcbdcfcd5e7f7a480f7980410eec853ef04a5e Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Wed, 22 Oct 2008 02:59:33 +0000 Subject: [PATCH] Tweaked rendering inside a volume to always return alpha 1.0. This fixes an issue which darkened the render from inside a volume with sky or premul on. Still need to find a good way to get an alpha value back into the shader (for compositing etc) without getting the render distorted by premul. --- source/blender/render/intern/source/volumetric.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index 95cd9e5588b..4ff6f5aea41 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -664,7 +664,8 @@ void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr) shr->combined[1] = col[1]; shr->combined[2] = col[2]; - if (col[3] > 1.0f) col[3] = 1.0f; + //if (col[3] > 1.0f) + col[3] = 1.0f; shr->combined[3] = col[3]; shr->alpha = col[3]; @@ -858,7 +859,7 @@ void vol_precache_objectinstance(Render *re, ObjectInstanceRen *obi, Material *m float co[3], voxel[3], scatter_col[3]; ShadeInput shi; - float view[3] = {0.0,0.0,1.0}; + float view[3] = {0.0,0.0,-1.0}; float density; float stepsize;