Blender V5.3
gpu_shader_material_toon.bsl.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2019-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
9
10[[node]]
12 float /*size*/,
13 float /*tsmooth*/,
14 float3 N,
15 float weight,
16 KernelGlobals &kg,
17 ShadingData &sd,
18 Closure &result)
19{
20 color = max(color, float4(0.0f));
22
23 /* Fall back to diffuse. */
24 ClosureDiffuse diffuse_data;
25 diffuse_data.color = color.rgb * weight;
26 diffuse_data.N = N;
27
28 result = closure_eval(kg, sd, diffuse_data);
29}
btScalar max
Closure closure_eval(KernelGlobals &kg, ShadingData &sd, ClosureDiffuse diffuse)
void node_bsdf_toon(float4 color, float, float, float3 N, float weight, KernelGlobals &kg, ShadingData &sd, Closure &result)
VecT safe_normalize(VecT vector)
#define N