Blender V4.3
gpu_shader_simple_lighting_info.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
10
11GPU_SHADER_INTERFACE_INFO(smooth_normal_iface, "").smooth(Type::VEC3, "normal");
12
13GPU_SHADER_CREATE_INFO(gpu_shader_simple_lighting)
14 .vertex_in(0, Type::VEC3, "pos")
15 .vertex_in(1, Type::VEC3, "nor")
16 .vertex_out(smooth_normal_iface)
17 .fragment_out(0, Type::VEC4, "fragColor")
18 .uniform_buf(0, "SimpleLightingData", "simple_lighting_data", Frequency::PASS)
19 .push_constant(Type::MAT4, "ModelViewProjectionMatrix")
20 .push_constant(Type::MAT3, "NormalMatrix")
21 .typedef_source("GPU_shader_shared.hh")
22 .vertex_source("gpu_shader_3D_normal_vert.glsl")
23 .fragment_source("gpu_shader_simple_lighting_frag.glsl")
24 .do_static_compilation(true);
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)