You can keep up with my renderer here: http://www.twitter.com/rove3d



Code: Select all
inline Color dualLayerRefl(const Color &r, const Color &bottomColor)
{
const auto t = White - r;
const auto bt = bottomColor * t;
return bt +
pow2(bt) * (
r + r * bottomColor * (prtselect(t.reciprocal(), White, t > 0) - White)
);
}
// Then you use it like this: F is the fresnel reflectance from the light entering the top layer
colorReflected = dualLayerRefl(r, bottomColor) * (White - F);
Users browsing this forum: No registered users and 4 guests