UDIM's breaking in Eevee #105661
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#105661
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.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.18
Blender Version
Broken: version: 3.5.0 Beta, branch: blender-v3.5-release, commit date: 2023-03-11 00:58, hash:
fe58ccfafb91
Worked: 3.4.1 and 3.3.4 LTS
Short description of error
[Please fill out a short description of the error here]
UDIM textures fail when using Eevee.
Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]
[Based on the default startup or an attached .blend file (as simple as possible)]
Can only reproduce with these exact texture files. Error does not persist in Blender 3.3.4 LTS, or 3.4.1. With either this file or original Blend file where the issue was found.
We need more information obviously. You'll need to provide more details on how to reproduce the problem and better describe the problem. The UDIM demo file still works correctly as does a simple scene for me.
Sorry I thought I attached a blend file. It was too large and I didn't catch the error the first time.
Confirmed, this is a regression since 3.4.x. Looks like it's running into a Sampler limit (at least for me).
There are 6 UDIM textures being used with just 3 unique sampler configurations but it looks like Eevee is not reusing the samplers since making these all the same doesn't help.
CC @pragma37 @fclem
Also I forgot to mention. Cycles works as expected. I was able to work around the error by adding an output node for Eevee that excludes a texture node. This prevents the error in the viewport while still allowing a Cycles render. Which makes sense after reading the above. Not optimal;, but woks as long as you do not intend to render with Eevee.
I've been looking into this.
I know why it doesn't work, what's driving me crazy is why it worked before.
The issue is that
gpu_node_graph_add_texture
adds every tiled texture twice.One when it's called for the tiled texture and another for the tiled map.
This is because it checks for sampler state too.
This is what the samplers look like in 3.4:
This looks wrong to me,
samp
andtsamp
should go in pairs (ie.samp0
andtsamp0
).In 3.5, samplers are declared in pairs in the generated source, but they are not used in pairs, so half of the declared samplers are unused:
This is after the fix (not checking for sampler state if the link type is IMAGE_TILED_MAPPING):
This is what I would expect for it to look like, but committing it without knowing what caused the regression in the first place feels sloppy to me.
Making a note of a second issue affecting the Metal backend:
This isn't directly related, as it is affecting a different shader (eevee_legacy_shader_effect_subsurface_translucency) but is triggered by this test asset.
The regression was actually caused by
6b8bb26c45
.Specifically, declaring built-in sampler uniforms with a fixed slot index in eevee_legacy_common_info.hh.
OpenGL drivers are usually fine with declaring as many sampler uniforms as you want as long as you don't use all of them, but it looks like that's not the case when using fixed bind slots.
The UDIM issue I explained before is still there and we should fix it, but the regression is not related UDIMs specifically, it affects all image nodes.