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.
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
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