5 Commits

Author SHA1 Message Date
Omar Emara
a345c4597e Refactor: Compositor: Use GPU setter nodes for unlinked sockets
This patch refactors how values of unlinked sockets are provided to
nodes. Previously, the GPU node stack values were initialized at
construction time and linked by the node's compile methods. This meant
that we needed to handle implicit conversion if the socket is linked to
an unlinked node group input.

Alternatively, we now insert a GPU setter node for each unlinked socket
that carries the value and type of the origin socket, and let the GPU
code generator do implicit conversion at the shader level. This has
three advantages:

- It makes it easier to add new types since we no longer have to handle
  those types in shader node code and it reduces code duplication.
- It makes the code more inline with how we implement multi-function
  procedures. So refactoring is easier.
- It opens the door to implement things like implicit inputs, which will
  be needed later for things like texture nodes.
2025-03-18 11:23:43 +02:00
Hans Goudey
4727dfd627 Cleanup: Remove unnecessary const qualifiers in function declarations 2025-02-14 14:32:57 -05:00
Omar Emara
bd379e1892 Refactor: Compositor: Use gpu_fn for ShaderNode class
This patch refactors the ShaderNode class to be a concrete class that
is implemented in terms of the node type gpu_fn. This is done to make it
easier to reuse existing nodes in other parts of Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/134210
2025-02-10 11:51:57 +01: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