15 lines
443 B
Plaintext
15 lines
443 B
Plaintext
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 */
|
|
|
|
#include "stdcycles.h"
|
|
|
|
shader node_normal(normal direction = normal(0.0, 0.0, 0.0),
|
|
normal NormalIn = normal(0.0, 0.0, 0.0),
|
|
output normal NormalOut = normal(0.0, 0.0, 0.0),
|
|
output float Dot = 1.0)
|
|
{
|
|
NormalOut = normalize(direction);
|
|
Dot = dot(NormalOut, normalize(NormalIn));
|
|
}
|