diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-13 03:20:44 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-13 03:20:51 +0300 |
commit | bf9904ec8018db89a8775ef651fadb2ea52457f0 (patch) | |
tree | 61d816364b06bcb7f20f8c763c9678172d5f7435 /source/blender/nodes/intern | |
parent | af0ab15e1dd84aadb32ee8d7a836a08fe6251474 (diff) |
Fix T59501: Eevee doesn't use integer node sockets
This is a hacky fix. We just convert the int as a float and use it as such.
This works ok for small int but will not be correct for numbers greater
than 4194303.
Correct support would require deeper change for UBO creation and socket
conversion.
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r-- | source/blender/nodes/intern/node_exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c index 08969fe3c0e..97d93ee0fa5 100644 --- a/source/blender/nodes/intern/node_exec.c +++ b/source/blender/nodes/intern/node_exec.c @@ -39,7 +39,8 @@ /* supported socket types in old nodes */ int node_exec_socket_use_stack(bNodeSocket *sock) { - return ELEM(sock->type, SOCK_FLOAT, SOCK_VECTOR, SOCK_RGBA, SOCK_SHADER); + /* NOTE: INT supported as FLOAT. Only for EEVEE. */ + return ELEM(sock->type, SOCK_INT, SOCK_FLOAT, SOCK_VECTOR, SOCK_RGBA, SOCK_SHADER); } /* for a given socket, find the actual stack entry */ |