Fix #124842: Fix CPU compositor sampling errors and make it match GPU #125149
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#125149
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Bill-Spitzak:resolveshift"
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?
Fixes a number of errors with cropping and with 0.5 offsets in the coordinates. Some code cleanup and reuse.
Your patch seems to include many unrelated changes that are mostly unrelated to #124842. So it is unlikely to be merged in its current form. The patch is also undercounted and the description is lacking the necessary information for review.
See https://developer.blender.org/docs/handbook/contributing/.
I would recommend you only change the minimal amount of code to fix the issue with clear patch description on what the problem is and how you solved it.
@ -218,2 +218,4 @@
/* border = false: Extend if wrap is false
* border = true: Clip if wrap is false */
template<bool border>
BLI_INLINE void bilinear_fl_impl(const float *buffer,
What are the changes in this function supposed to do?
These are just code cleanup from an aborted attempt to make the same changes to the bicubic sampler. I gave up on that as being too intrusive, in particular because the bicubic one always does Extend. Can remove them if desired.
@ -252,50 +252,7 @@ class MemoryBuffer {
void read_elem_bilinear(float x, float y, float *out) const
{
/* Only clear past +/-1 borders to be able to smooth edges. */
What are the functional changes associated with all of those changes?
The
Extend
version of the samplers is used (except for Bilinear which will use Wrap when requested because it was doing it correctly). Clip is done by here so it can be enabled per-axis and it performs the correct calculation, Extend is passed to the samplers. This did require significant code rearrangement as I did not want to change the behavior of the existing per-sampler calls, since they are used elsewhere in COM.@ -64,3 +63,1 @@
r_bounds.xmax = ceil(maxx);
r_bounds.ymin = floor(miny);
r_bounds.ymax = ceil(maxy);
r_bounds.xmin = floor(minx + 0.1f);
Why those biases?
This is a mistake, they only fixed the Scale. It appears the errors in Rotate are much larger but I also think it is less vital to fix them.
@ -167,3 +167,3 @@
const float rel_scale_y = *it.in(1) * scale_y_factor;
const float scaled_x = scale_coord_inverted(
from_scale_offset_x + canvas_.xmin + it.x, scale_center_x, rel_scale_x);
from_scale_offset_x + canvas_.xmin + 0.5f + it.x, scale_center_x, rel_scale_x) - 0.5f;
How are those related to #124842?
The translation is wrong without these .5 offsets and did not match the GPU, and made the edges up to .5 too dark.
e5720fd4d4
toa0e5840e47
I tried to update this patch but it does not seem to have worked correctly. Closing this and making a new pull request.
#125267
Pull request closed