diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-21 21:04:09 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-21 21:04:09 +0300 |
commit | 133dfdd704b6a2a4d46337696773b331a44304ea (patch) | |
tree | e7465681db5a8783614fa2617ecb2455f1bef623 /source/blender/editors | |
parent | 7f4a2fc437cf9a6decbda152bd7d36ce7a08929f (diff) |
Shading: Add White Noise node.
The White Noise node hashes the input and returns a random number in the
range [0, 1]. The input can be a 1D, 2D, 3D, or a 4D vector.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5550
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 4201fe7c289..cc2fb6e1c2a 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1186,6 +1186,11 @@ static void node_shader_buts_ambient_occlusion(uiLayout *layout, uiItemR(layout, ptr, "only_local", 0, NULL, ICON_NONE); } +static void node_shader_buts_white_noise(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "dimensions", 0, "", ICON_NONE); +} + /* only once called */ static void node_shader_set_butfunc(bNodeType *ntype) { @@ -1330,6 +1335,9 @@ static void node_shader_set_butfunc(bNodeType *ntype) case SH_NODE_AMBIENT_OCCLUSION: ntype->draw_buttons = node_shader_buts_ambient_occlusion; break; + case SH_NODE_TEX_WHITE_NOISE: + ntype->draw_buttons = node_shader_buts_white_noise; + break; } } |