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_ies_light.osl')
-rw-r--r--intern/cycles/kernel/shaders/node_ies_light.osl29
1 files changed, 14 insertions, 15 deletions
diff --git a/intern/cycles/kernel/shaders/node_ies_light.osl b/intern/cycles/kernel/shaders/node_ies_light.osl
index a0954e3a444..ea8c44e09de 100644
--- a/intern/cycles/kernel/shaders/node_ies_light.osl
+++ b/intern/cycles/kernel/shaders/node_ies_light.osl
@@ -19,24 +19,23 @@
/* IES Light */
-shader node_ies_light(
- int use_mapping = 0,
- matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
- int slot = 0,
- float Strength = 1.0,
- point Vector = I,
- output float Fac = 0.0)
+shader node_ies_light(int use_mapping = 0,
+ matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
+ int slot = 0,
+ float Strength = 1.0,
+ point Vector = I,
+ output float Fac = 0.0)
{
- point p = Vector;
+ point p = Vector;
- if (use_mapping) {
- p = transform(mapping, p);
- }
+ if (use_mapping) {
+ p = transform(mapping, p);
+ }
- p = normalize(p);
+ p = normalize(p);
- float v_angle = acos(-p[2]);
- float h_angle = atan2(p[0], p[1]) + M_PI;
+ float v_angle = acos(-p[2]);
+ float h_angle = atan2(p[0], p[1]) + M_PI;
- Fac = Strength * texture(format("@l%d", slot), h_angle, v_angle);
+ Fac = Strength * texture(format("@l%d", slot), h_angle, v_angle);
}