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:
Diffstat (limited to 'intern/cycles/kernel/shaders/node_ambient_occlusion.osl')
-rw-r--r--intern/cycles/kernel/shaders/node_ambient_occlusion.osl36
1 files changed, 22 insertions, 14 deletions
diff --git a/intern/cycles/kernel/shaders/node_ambient_occlusion.osl b/intern/cycles/kernel/shaders/node_ambient_occlusion.osl
index 825cccd59ce..7bf28719e78 100644
--- a/intern/cycles/kernel/shaders/node_ambient_occlusion.osl
+++ b/intern/cycles/kernel/shaders/node_ambient_occlusion.osl
@@ -16,20 +16,28 @@
#include "stdosl.h"
-shader node_ambient_occlusion(
- color ColorIn = color(1.0, 1.0, 1.0),
- int samples = 16,
- float Distance = 1.0,
- normal Normal = N,
- int inside = 0,
- int only_local = 0,
- output color ColorOut = color(1.0, 1.0, 1.0),
- output float AO = 1.0)
+shader node_ambient_occlusion(color ColorIn = color(1.0, 1.0, 1.0),
+ int samples = 16,
+ float Distance = 1.0,
+ normal Normal = N,
+ int inside = 0,
+ int only_local = 0,
+ output color ColorOut = color(1.0, 1.0, 1.0),
+ output float AO = 1.0)
{
- int global_radius = (Distance == 0.0 && !isconnected(Distance));
+ int global_radius = (Distance == 0.0 && !isconnected(Distance));
- /* Abuse texture call with special @ao token. */
- AO = texture("@ao", samples, Distance, Normal[0], Normal[1], Normal[2], inside, "sblur", only_local, "tblur", global_radius);
- ColorOut = ColorIn * AO;
+ /* Abuse texture call with special @ao token. */
+ AO = texture("@ao",
+ samples,
+ Distance,
+ Normal[0],
+ Normal[1],
+ Normal[2],
+ inside,
+ "sblur",
+ only_local,
+ "tblur",
+ global_radius);
+ ColorOut = ColorIn * AO;
}
-