diff options
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c b/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c index 36971d4e799..abe80ebcefb 100644 --- a/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c +++ b/source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c @@ -47,8 +47,15 @@ static int node_shader_gpu_ambient_occlusion(GPUMaterial *mat, GPU_material_flag_set(mat, GPU_MATFLAG_DIFFUSE); float inverted = node->custom2 ? 1.0f : 0.0f; + float f_samples = divide_ceil_u(node->custom1, 4); - return GPU_stack_link(mat, node, "node_ambient_occlusion", in, out, GPU_constant(&inverted)); + return GPU_stack_link(mat, + node, + "node_ambient_occlusion", + in, + out, + GPU_constant(&inverted), + GPU_constant(&f_samples)); } static void node_shader_init_ambient_occlusion(bNodeTree *UNUSED(ntree), bNode *node) |