Page 1 of 1
Converting old materials isl to accommodate the new roughness attribute
Posted: Mon Aug 27, 2018 9:53 pm
by pixie
There's quite a few materials which uses the old way of dealing with roughness, normally it can be easily converted but materials that have it coded in ISL have it hardcoded to the old way. How can one convert it in code?
Re: Converting old materials isl to accommodate the new roughness attribute
Posted: Mon Aug 27, 2018 10:43 pm
by OnoSendai
Code: Select all
roughnessForExponent(Real exponent)
{
return pow(2 / (exponent + 2), 1.f / 6.f);
}
Re: Converting old materials isl to accommodate the new roughness attribute
Posted: Mon Aug 27, 2018 11:28 pm
by pixie
Thanks Ono!