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

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

#include "stdcycles.h"

shader node_mix_vector(int use_clamp = 0,
                       float Factor = 0.5,
                       vector A = 0.0,
                       vector B = 0.0,
                       output vector Result = 0.0)
{
  float t = (use_clamp) ? clamp(Factor, 0.0, 1.0) : Factor;
  Result = mix(A, B, t);
}