clearcoat Shader

NegativeMind
1 min readJan 8, 2011

--

結構どうでも良いんだけど、たまたま見つけたのでメモしておく。
ファイル名に”Shader”って入ってなくて今まで気づかなかった。

クリアーコーティング的なShaderのサンプルコード→clearcoat Shader Class(clearcoat.cpp)

This is Jim Craighead’s code. Ripped straight from Studio…

This basically computes a fresnel reflection coeficient.
It could probably use some optimization, but the trig identities are left as an exercise for the masochistic.
Also note that this is reasonably accurate for refractive indices greater than 1, but a complete hack for smaller values.
There are still problems with values below 0.6 such as Gold and Silver.

Originally published at NegativeMindException.

--

--