diff options
Diffstat (limited to 'source/blender/render/intern/source/volumetric.c')
-rw-r--r-- | source/blender/render/intern/source/volumetric.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c index fee71563d2b..36895f8ad53 100644 --- a/source/blender/render/intern/source/volumetric.c +++ b/source/blender/render/intern/source/volumetric.c @@ -383,8 +383,8 @@ static float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, const float w[3 return normalize * (1.f - k*k) / ((1.f - kcostheta) * (1.f - kcostheta)); } - /* - * not used, but here for reference: + /* not used, but here for reference: */ +#if 0 switch (phasefunc_type) { case MA_VOL_PH_MIEHAZY: return normalize * (0.5f + 4.5f * powf(0.5 * (1.f + costheta), 8.f)); @@ -404,7 +404,7 @@ static float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, const float w[3 default: return normalize * 1.f; } - */ +#endif } /* Compute transmittance = e^(-attenuation) */ @@ -568,15 +568,15 @@ void vol_get_scattering(ShadeInput *shi, float scatter_col[3], const float co[3] /* -The main volumetric integrator, using an emission/absorption/scattering model. - -Incoming radiance = - -outgoing radiance from behind surface * beam transmittance/attenuation -+ added radiance from all points along the ray due to participating media - --> radiance for each segment = - (radiance added by scattering + radiance added by emission) * beam transmittance/attenuation -*/ + * The main volumetric integrator, using an emission/absorption/scattering model. + * + * Incoming radiance = + * + * outgoing radiance from behind surface * beam transmittance/attenuation + * + added radiance from all points along the ray due to participating media + * --> radiance for each segment = + * (radiance added by scattering + radiance added by emission) * beam transmittance/attenuation + */ /* For ease of use, I've also introduced a 'reflection' and 'reflection color' parameter, which isn't * physically correct. This works as an RGB tint/gain on out-scattered light, but doesn't affect the light @@ -667,12 +667,12 @@ static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int in int render_this=0; /* don't render the backfaces of ztransp volume materials. - + * * volume shading renders the internal volume from between the * ' view intersection of the solid volume to the * intersection on the other side, as part of the shading of * the front face. - + * * Because ztransp renders both front and back faces independently * this will double up, so here we prevent rendering the backface as well, * which would otherwise render the volume in between the camera and the backface |