1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
/* -------------------------------------------------------------------- */
/** \name Select ID for Edit Mesh Selection
* \{ */
GPU_SHADER_INTERFACE_INFO(select_id_iface, "").flat(Type::INT, "id");
GPU_SHADER_CREATE_INFO(select_id_flat)
.push_constant(Type::FLOAT, "sizeVertex")
.push_constant(Type::INT, "offset")
.vertex_in(0, Type::VEC3, "pos")
.vertex_in(1, Type::INT, "index")
.vertex_out(select_id_iface)
.fragment_out(0, Type::UINT, "fragColor")
.vertex_source("select_id_vert.glsl")
.fragment_source("select_id_frag.glsl")
.additional_info("draw_modelmat")
.do_static_compilation(true);
GPU_SHADER_CREATE_INFO(select_id_uniform)
.define("UNIFORM_ID")
.push_constant(Type::FLOAT, "sizeVertex")
.push_constant(Type::INT, "id")
.vertex_in(0, Type::VEC3, "pos")
.fragment_out(0, Type::UINT, "fragColor")
.vertex_source("select_id_vert.glsl")
.fragment_source("select_id_frag.glsl")
.additional_info("draw_modelmat")
.do_static_compilation(true);
GPU_SHADER_CREATE_INFO(select_id_flat_clipped)
.additional_info("select_id_flat")
.additional_info("drw_clipped")
.do_static_compilation(true);
GPU_SHADER_CREATE_INFO(select_id_uniform_clipped)
.additional_info("select_id_uniform")
.additional_info("drw_clipped")
.do_static_compilation(true);
/** \} */
|