diff options
author | Thomas Dinges <blender@dingto.org> | 2013-11-09 17:14:00 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-11-09 17:14:00 +0400 |
commit | cc7b2a0b046f9eb0548b8a1e84c4deb5754487c1 (patch) | |
tree | 690d653011978ab63979d4f6886f3183c5a66e15 /source/blender/gpu/shaders | |
parent | 396fb315c5f0267a0511eda87221c8a2836c6f21 (diff) |
Cycles / Fresnel Node:
* Add a "Normal" Input to the Fresnel node.
* Fix for the Fresnel GLSL code (normalize the Incoming vector).
Patch #37384 by Philipp Oeser (lichtwerk) , thanks!
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 633112095a7..78664f3b539 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -2131,7 +2131,7 @@ void node_add_shader(vec4 shader1, vec4 shader2, out vec4 shader) void node_fresnel(float ior, vec3 N, vec3 I, out float result) { float eta = max(ior, 0.00001); - result = fresnel_dielectric(I, N, (gl_FrontFacing)? eta: 1.0/eta); + result = fresnel_dielectric(normalize(I), N, (gl_FrontFacing)? eta: 1.0/eta); } /* gamma */ |