Page MenuHome

Eevee/Cycles Fraction Vector Math produces glitches
Closed, ArchivedPublic

Description

System Information
Operating system: Windows-10-10.0.22499-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.47

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-11-15 21:08, hash: rB7e42ae7c1af0
Worked: (newest version of Blender that worked as expected)

Short description of error
When you take the output from the texture Coordinates Node (Works with every output I think)
And you take it through a fraction vector math node and you take another vector math node set to multiply before that and you raise the numbers. Then it flickers strange.
The glitches are in Eevee in multiply on 22 and in cycles, it looks slightly different.

Event Timeline

This is a numerical precision issue, to which I don't know exists a good solution. I do not consider this a bug.

The problem is that due to ray-tracing or rasterization numerical precision, the computed Z coordinate of of a plane at Z 0 may be e.g. -0.0000001 or 0.0000001. Which one it is random, and if you do math that depends on this being exact you get problems.

For texture nodes we work around this by adding a tiny offset to the texture coordinates so that planes at integer locations avoid this problem, but it can't be avoided in general.