Cycles: change Ambient Occlusion shader to output colors.
This means the shader can now be used for procedural texturing. New settings on the node are Samples, Inside, Local Only and Distance. Original patch by Lukas with further changes by Brecht. Differential Revision: https://developer.blender.org/D3479
This commit is contained in:

committed by
Brecht Van Lommel

parent
2b9edbc98b
commit
799779d432
@@ -996,24 +996,6 @@ ccl_device void svm_node_closure_holdout(ShaderData *sd, float *stack, uint4 nod
|
||||
sd->flag |= SD_HOLDOUT;
|
||||
}
|
||||
|
||||
ccl_device void svm_node_closure_ambient_occlusion(ShaderData *sd, float *stack, uint4 node)
|
||||
{
|
||||
uint mix_weight_offset = node.y;
|
||||
|
||||
if(stack_valid(mix_weight_offset)) {
|
||||
float mix_weight = stack_load_float(stack, mix_weight_offset);
|
||||
|
||||
if(mix_weight == 0.0f)
|
||||
return;
|
||||
|
||||
closure_alloc(sd, sizeof(ShaderClosure), CLOSURE_AMBIENT_OCCLUSION_ID, sd->svm_closure_weight * mix_weight);
|
||||
}
|
||||
else
|
||||
closure_alloc(sd, sizeof(ShaderClosure), CLOSURE_AMBIENT_OCCLUSION_ID, sd->svm_closure_weight);
|
||||
|
||||
sd->flag |= SD_AO;
|
||||
}
|
||||
|
||||
/* Closure Nodes */
|
||||
|
||||
ccl_device_inline void svm_node_closure_store_weight(ShaderData *sd, float3 weight)
|
||||
|
Reference in New Issue
Block a user