Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit 60239445 authored by MURRAY David's avatar MURRAY David
Browse files

add clamp on extinction

parent 2eb6839b
......@@ -262,11 +262,13 @@ COLOR bsdf_transmittance(float length)
float sigma = 4.f * M_PIf * kappa/ wavelength;
float extinction = lerp( _extinction[current_prd.id_wavelength], _extinction[current_prd.id_wavelength+1], current_prd.wavelength_offset);
return COLOR(optix::expf(-sigma * length) * (1.f - extinction));
return COLOR(optix::expf(-sigma * length) * (1.f - extinction)));
// return optix::expf(-_extinction[current_prd.id_wavelength]);
#else
COLOR sigma = _kappa / _wavelengths * -4.f * M_PIf;
return mrf::spectrum::expf( sigma * length ) * (COLOR(1.f) - _extinction);
COLOR user_ext = (COLOR(1.f) - clamp_negative_color(_extinction));
clamp_negative_color(user_ext);
return mrf::spectrum::expf( sigma * length ) * user_ext;
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment