Page MenuHome

Fixing clamp flag of Math shader node and MixRGB shader node in Blender Render
AbandonedPublic

Authored by Alexander Romanov (a.romanov) on Oct 30 2014, 8:41 AM.

Details

Summary

Clamp flag had no effect on result value.
This diff fixes the problem.



Best regards,
Blend4Web Team.

Diff Detail

Repository
rB Blender

Event Timeline

Alexander Romanov (a.romanov) retitled this revision from to Fixing clamp flag of Math shader node and MixRGB shader node in Blender Render.
Alexander Romanov (a.romanov) updated this object.

That looks all good to me,
@Lukas Toenne (lukastoenne) maybe you could look over it again and commit it - it's not that complex and decreases the bug o meter ;)

Thanks for the patch, but i've noticed ti too late and just committed slightly more clear fix..

source/blender/gpu/shaders/gpu_shader_material.glsl
312

Wouldn't call it that specific, imo makes sense to have more generic purpose names,

source/blender/nodes/shader/nodes/node_shader_math.c
281

You can use something like:

GPU_link(mat, "math_clamp", out[0].link, &out[0].link);

instead.

source/blender/nodes/shader/nodes/node_shader_mixRgb.c
64

This is wrong, custom2 also has bitflag for alpha.

Thanks for your remarks anyway!

If this is obsolete now, please close it (abandon it). Thanks.

If this is obsolete now, please close it (abandon it). Thanks.