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

node_mix_closure.osl « shaders « osl « kernel « cycles « intern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6d8e0f242f4bf7abc61808c46befb1c16708fa8c (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_mix_closure(float Fac = 0.5,
                        closure color Closure1 = 0,
                        closure color Closure2 = 0,
                        output closure color Closure = 0)
{
  float t = clamp(Fac, 0.0, 1.0);
  Closure = (1.0 - t) * Closure1 + t * Closure2;
}