Blender V5.3
gpu_shader_material_separate_color.bsl.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
8
9[[node]]
10void separate_color_rgb(float4 col, float &r, float &g, float &b)
11{
12 r = col.r;
13 g = col.g;
14 b = col.b;
15}
16
17[[node]]
18void separate_color_hsv(float4 col, float &r, float &g, float &b)
19{
20 float4 hsv;
21
22 rgb_to_hsv(col, hsv);
23 r = hsv[0];
24 g = hsv[1];
25 b = hsv[2];
26}
27
28[[node]]
29void separate_color_hsl(float4 col, float &r, float &g, float &b)
30{
31 float4 hsl;
32
33 rgb_to_hsl(col, hsl);
34 r = hsl[0];
35 g = hsl[1];
36 b = hsl[2];
37}
void rgb_to_hsv(float4 rgb, float4 &outcol)
void rgb_to_hsl(float4 rgb, float4 &outcol)
void separate_color_hsv(float4 col, float &r, float &g, float &b)
void separate_color_rgb(float4 col, float &r, float &g, float &b)
void separate_color_hsl(float4 col, float &r, float &g, float &b)