rj-action-library/Runtime/Shading/Library/Light.gdshaderinc

14 lines
396 B
Plaintext
Raw Normal View History

2025-05-18 17:11:31 +00:00
// #include "res://addons/rokojori_action_library/Runtime/Shading/Library/Light.gdshaderinc"
2025-04-19 07:57:45 +00:00
float fresnel( vec3 normal, vec3 view, float amount )
2025-01-03 12:09:23 +00:00
{
2025-04-19 07:57:45 +00:00
return pow( ( 1.0 - clamp( dot( normalize( normal ), normalize( view ) ), 0.0, 1.0 ) ), amount );
2025-01-03 12:09:23 +00:00
}
2025-04-19 07:57:45 +00:00
float fresnelNormalized( vec3 normal, vec3 view, float amount )
2025-01-03 12:09:23 +00:00
{
2025-04-19 07:57:45 +00:00
return pow( ( 1.0 - clamp( dot( normal, view ), 0.0, 1.0 ) ), amount);
2025-01-03 12:09:23 +00:00
}