Logo
Explore Help
Register Sign In
griefith/test2
1
0
Fork 0
You've already forked test2
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
6a7fa2fc0fb2df7e996ccfd39ddf8045dbc96d4e
test2/intern/cycles/kernel/osl/shaders/node_mix_vector.osl

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
429 B
Plaintext
Raw Normal View History

License headers: use SPDX-FileCopyrightText for *.inl and *.osl files
2023-08-04 13:24:17 +10:00
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
Node: Mix node This patch is a response to T92588 and is implemented as a Function/Shader node. This node has support for Float, Vector and Color data types. For Vector it supports uniform and non-uniform mixing. For Color it now has the option to remove factor clamping. It replaces the Mix RGB for Shader and Geometry node trees. As discussed in T96219, this patch converts existing nodes in .blend files. The old node is still available in the Python API but hidden from the menus. Reviewed By: HooglyBoogly, JacquesLucke, simonthommes, brecht Maniphest Tasks: T92588 Differential Revision: https://developer.blender.org/D13749
2022-08-30 11:05:46 +01:00
#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);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 398ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API