Welcome to mirror list, hosted at ThFree Co, Russian Federation.

node_normal.osl « shaders « osl « kernel « cycles « intern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7b75c03a2b276656e51f9d029fba4b746f40c32d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* SPDX-License-Identifier: Apache-2.0
 * Copyright 2011-2022 Blender Foundation */

#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));
}