diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-15 19:44:54 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-02-15 22:31:48 +0300 |
commit | c6928843dc9f07f4676048309d7a895ea0a1ef4e (patch) | |
tree | 3ace6014c34a4c47e6130860dd4959d1391d582a /source/blender/gpu/shaders/material | |
parent | 031dcbf15be5eef3d76488949ccebbf0872b1086 (diff) |
Fix Eevee shader node error when using both RGB and vector curve nodes
Diffstat (limited to 'source/blender/gpu/shaders/material')
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_vector_curves.glsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_vector_curves.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_vector_curves.glsl index 63e97e66c90..f6dec1b24e2 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_vector_curves.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_vector_curves.glsl @@ -1,5 +1,5 @@ /* ext is vec4(in_x, in_dy, out_x, out_dy). */ -float curve_extrapolate(float x, float y, vec4 ext) +float curve_vec_extrapolate(float x, float y, vec4 ext) { if (x < 0.0) { return y + x * ext.y; @@ -33,9 +33,9 @@ void curves_vec(float fac, outvec.y = texture(curvemap, co.yw).y; outvec.z = texture(curvemap, co.zw).z; - outvec.x = curve_extrapolate(co.x, outvec.r, ext_x); - outvec.y = curve_extrapolate(co.y, outvec.g, ext_y); - outvec.z = curve_extrapolate(co.z, outvec.b, ext_z); + outvec.x = curve_vec_extrapolate(co.x, outvec.r, ext_x); + outvec.y = curve_vec_extrapolate(co.y, outvec.g, ext_y); + outvec.z = curve_vec_extrapolate(co.z, outvec.b, ext_z); outvec = mix(vec, outvec, fac); } |