Page MenuHome

Math modulo node returns black for negative numbers.
Closed, InvalidPublic

Description

System Information
win 7 x64, GTX 780

Blender Version
Broken: buildbot 7660218
Worked: probably never

The math node's modulo function returns black for all values below zero.

Exact steps for others to reproduce the error
Open attached .blend, press shift-z, note the black on the left side of the sphere.

Event Timeline

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Invalid.May 7 2014, 3:11 PM
Brecht Van Lommel (brecht) claimed this task.

It returns a negative value, which is displayed as black because negative numbers can't be displayed as colors.

I don't think that's a bug, the sign of the result of a modulo operation is a matter of convention, we happen to use the one where the result takes the sign of the dividend.
http://en.wikipedia.org/wiki/Modulo_operation

I see. Positive would have been more practical in the course of making shaders, I think. But fair enough, it's not a big deal.