12 lines
310 B
Plaintext
12 lines
310 B
Plaintext
float fresnel( vec3 _NORMAL, vec3 _VIEW, float amount )
|
|
{
|
|
return pow( ( 1.0 - clamp( dot( normalize( _NORMAL ), normalize( _VIEW ) ), 0.0, 1.0 ) ), amount );
|
|
}
|
|
|
|
float fresnelNormalized( vec3 _NORMAL, vec3 _VIEW, float amount )
|
|
{
|
|
return pow( ( 1.0 - clamp( dot( _NORMAL, _VIEW ), 0.0, 1.0 ) ), amount);
|
|
}
|
|
|
|
|