Converting old materials isl to accommodate the new roughness attribute

Feature requests, bug reports and related discussion
Post Reply
3 posts • Page 1 of 1
User avatar
pixie
Indigo 100
Posts: 2107
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Converting old materials isl to accommodate the new roughness attribute

Post by pixie » Mon Aug 27, 2018 9:53 pm

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?

User avatar
OnoSendai
Developer
Posts: 6127
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: Converting old materials isl to accommodate the new roughness attribute

Post by OnoSendai » Mon Aug 27, 2018 10:43 pm

Code: Select all

roughnessForExponent(Real exponent)
{
  return pow(2 / (exponent + 2), 1.f / 6.f);
}

User avatar
pixie
Indigo 100
Posts: 2107
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: Converting old materials isl to accommodate the new roughness attribute

Post by pixie » Mon Aug 27, 2018 11:28 pm

Thanks Ono! :)

Post Reply
3 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests