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/gpu | |
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/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index eb6c0c6cc5e..f3386ec3a65 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -1394,6 +1394,8 @@ static void gpu_node_input_link(GPUNode *node, GPUNodeLink *link, const eGPUType static const char *gpu_uniform_set_function_from_type(eNodeSocketDatatype type) { switch (type) { + /* For now INT is supported as float. */ + case SOCK_INT: case SOCK_FLOAT: return "set_value"; case SOCK_VECTOR: |