Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-03-13 03:20:44 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-03-13 03:20:51 +0300
commitbf9904ec8018db89a8775ef651fadb2ea52457f0 (patch)
tree61d816364b06bcb7f20f8c763c9678172d5f7435 /source/blender/nodes/shader/node_shader_util.c
parentaf0ab15e1dd84aadb32ee8d7a836a08fe6251474 (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/shader/node_shader_util.c')
-rw-r--r--source/blender/nodes/shader/node_shader_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index 5488706b87d..cc2032a7ba5 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -102,6 +102,8 @@ void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, bNodeStack *ns)
if (type == SOCK_FLOAT)
gs->type = GPU_FLOAT;
+ else if (type == SOCK_INT)
+ gs->type = GPU_FLOAT; /* HACK: Support as float. */
else if (type == SOCK_VECTOR)
gs->type = GPU_VEC3;
else if (type == SOCK_RGBA)