Eevee: math wrap and floor, AMD Driver precision issues #88151
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#88151
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: Radeon RX 5500 XT ATI Technologies Inc. 4.5.14831 Core Profile Context 21.5.1 27.20.21003.1028
Blender Version
Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash:
02948a2cab
Blender 2.83 LTS has same problem
Short description of error
Math and Vector Wrap give different results for Eevee and Cycles, also doesn't swap min max, when max is less than min
More info
This is important for an upcoming Shader Nodes patch that relies on wrap operation
also for shader setups that rely on this
other people tested this, the problem seems to appear only on AMD Windows
Exact steps for others to reproduce the error
When Using -3 as Min for wrap, and 3 as max, some values give different results in Eevee than in Cycles
Floor operation is probably the cause of this
this node setup
Cycles
Eevee
eevee_math_wrap_different_from_cycles.blend
Added subscriber: @IyadAhmed
Math Node Wrap: Different results for Eevee and Cycles, also doesn't swap min max, when max is less than minto Wrap math operation: Different results for Eevee and Cyclesit seems to be only on AMD/Windows configuration
Wrap math operation: Different results for Eevee and Cyclesto Eevee: wrong results for wrap math operation with AMD WindowsEevee: wrong results for wrap math operation with AMD Windowsto Eevee: wrong results for wrap and floor math with AMD WindowsEevee: wrong results for wrap and floor math with AMD Windowsto Eevee: wrong results for wrap and floor math with AMD GPU WindowsMultiple people with non-AMD/non-Windows tested and the issue was not happening for them
Eevee: wrong results for wrap and floor math with AMD GPU Windowsto Eevee: math wrap and floor, AMD Driver precision issuesAdded subscriber: @Jeroen-Bakker
Added subscriber: @OmarEmaraDev
I can replicate the issue on Mesa R600g. Software rasterization is identical to Cycles. I can take a look later today.
Great
Added subscriber: @CharlieJolly
@CharlieJolly The max and min inputs of the wrap function seems to be inverted, at least relative to the Godot code, is that intended? Also can you take a look at this?
@IyadAhmed Seems to be a precision issue indeed.
floor((value - minValue) / (maxValue - minValue))
may be zero when it should ideally be 1 for off-one-division results. Not sure what should be done here. Lets wait for Charlie's opinion on this.Great, many thanks for working on the issue
Also for swapped values, max and min should be swapped when max is less than min I think
Works fine here on Windows/Intel.
The inputs are swapped around probably to match the UI parameter order which uses a, b and c.
Probably is a precision issue. Division by zero should be avoided as
range
is checked before the divide operation.Min, max values could be swapped but this is a change in behaviour.
I can't test AMD here unfortunately.
another observation, adding a small value before wrap produces wrong results both on Cycles and Eevee, possibly on non-AMD as well
The code is consistent. I think the sockets maybe labelled incorrectly. Not sure why this happened, could be oversight in original patch. The bug then maybe caused by the issue that max is less than min.
@IyadAhmed Can you check again but swapping min and max. Can you also check with OSL too?
Sure swapping is same problem, this is a different problem than with AMD driver, it happens on all
to make it clear adding a small value to input, makes it always act as if max is less than min, even if you write values swapped
OSL
here's "correct" result for comparison
Here is a file with a nodegroup implementing the wrap function that may help troubleshoot the issue. The labels are an easy fix but perhaps leave that until this bug is fixed.
eevee_math_wrap_different_from_cycles_v2.blend
I don't think I can help anymore without an AMD card to test.
Cycles (OSL same results as non-OSL)
Eevee
Produces different results
Changed status from 'Needs Triage' to: 'Confirmed'