Compositor: Unify Texture node between CPU and GPU #118377
No reviewers
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#118377
Loading…
Reference in New Issue
No description provided.
Delete Branch "OmarEmaraDev/blender:unify-texture-node"
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?
The CPU and GPU implementations of the compositor Texture node sample
the texture at different locations, producing differences. This is
primarly an issue with half pixel offsets to evaluate the texture at the
center of the pixels.
The CPU compositor only adds the offsets if interpolation is disabled,
regardless if the texture is of type image or not. Further the offset
was wrong, since it was not a half pixel offset, but a full pixel one.
The offsets should always be added, since it won't make a difference in
the non interpolated case, and it should always be added especially if
interpolation is enabled. A comment in the old code mentions something
about artifacts, but it is possible that this is a consequence of the
wrong offset that was used.
This patch always adds a half pixel offset, following the GPU code.
To double check, here is the old implementation, where we are differencing the image we get directly from an Image node and the one we get from an Image Texture node. Notice how it looks like a horizontal partial derivative, due to the full pixel offset that the old code introduces.
The new implementation has a zero difference.
@ -179,2 +147,2 @@
else {
it.out[0] = it.out[1] = it.out[2] = it.out[3];
TexResult texture_result;
const int result_type = multitex_ext_safe(
The
multitex_ext_safe
explicitly disables texture nodes. Is there a specific reason for this? Otherwise it should be something between these linesNo specific reason, I will use
multitex_ext
.