Commit Graph

7 Commits

Author SHA1 Message Date
Omar Emara
36154a1ab4 Compositor: Initial support for implicit inputs
This patch adds initial support for implicit inputs in pixel operations.
This is currently a non-functional change but will be used in the
future to support implicit inputs in texture nodes or so.

This works by exposing extra inputs to pixel operation for each of the
supported implicit input types if needed, and linking those inputs to
instances of the ImplicitInputOperation operation.

Only a single implicit input exist for now and we do not differentiate
between any of the implicit inputs type. In order to do that, we need to
refactor how input declarations for implicit inputs happen, since they
are now tied to the Geometry Nodes specifically.
2025-03-26 13:42:21 +02:00
Omar Emara
27bf89e933 Refactor: Compositor: Use BKE conversions for MF operation
This patch uses the BKE implicit conversion rules to implement implicit
conversion in multi-function procedure operations in the compositor.
Since conversions use ColorSceneLinear4f to represent colors instead of
float4, we need to insert extra implicit conversions around color
sockets.

Special attention was given to variable destruction in the
implementation because it is now possible for implicit variables to be
outputs, so we need to make sure they are not destructed.
2025-02-24 17:20:16 +02:00
Brecht Van Lommel
1eb1755e1f Cleanup: Various clang-tidy warnings in compositor
Pull Request: https://projects.blender.org/blender/blender/pulls/133734
2025-01-31 17:03:17 +01:00
Omar Emara
980226662b Compositor: Allow pixel operations to operate on single values
This patch allows the multi-function procedure pixel operation to
operate on single values. While it previously assumes a 1x1 image for
processing which was later reduced to a single value using input
processors. This is more efficient, but will allow us to use
multi-function procedures for single value sub-trees even in GPU
execution.
2025-01-28 13:54:13 +02:00
Omar Emara
503e2c46a5 Fix: Compositor crash with group of different typed socket
The compositor crashes if a node inside a node group is connected to a
group input that have a different type and the node group is used
without a connection to that input. That's because the compositor code
assumes the type of the group input without implicit type conversion to
the expected type of the node. To fix this, handle implicit conversion
for unconnected sockets as well.
2025-01-06 11:14:27 +02:00
Aras Pranckevicius
496a3749d7 Cleanup: rename namespace realtime_compositor->compositor
Pull Request: https://projects.blender.org/blender/blender/pulls/132008
2024-12-17 11:39:04 +01:00
Aras Pranckevicius
a401089a9d Cleanup: move compositor files out of realtime_compositor folder
By now it is just a "compositor", so move the files one folder up.
Things that were under realtime_compositor/intern move into
already existing intern folder.

Pull Request: https://projects.blender.org/blender/blender/pulls/132004
2024-12-17 10:34:24 +01:00