2022-02-11 13:53:21 +01:00
|
|
|
/* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
* Copyright 2011-2022 Blender Foundation */
|
2011-12-16 18:15:07 +00:00
|
|
|
|
2020-02-11 21:40:23 -07:00
|
|
|
#include "stdcycles.h"
|
2011-12-16 18:15:07 +00:00
|
|
|
|
2016-05-29 12:24:47 +02:00
|
|
|
shader node_normal(normal direction = normal(0.0, 0.0, 0.0),
|
2011-12-16 18:15:07 +00:00
|
|
|
normal NormalIn = normal(0.0, 0.0, 0.0),
|
|
|
|
|
output normal NormalOut = normal(0.0, 0.0, 0.0),
|
2012-09-02 12:24:04 +00:00
|
|
|
output float Dot = 1.0)
|
2011-12-16 18:15:07 +00:00
|
|
|
{
|
2016-05-29 12:24:47 +02:00
|
|
|
NormalOut = normalize(direction);
|
2014-12-10 19:07:26 +05:00
|
|
|
Dot = dot(NormalOut, normalize(NormalIn));
|
2011-12-16 18:15:07 +00:00
|
|
|
}
|