Blender  V3.3
overlay_wireframe_info.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
4 
5 GPU_SHADER_INTERFACE_INFO(overlay_wireframe_iface, "")
6  .flat(Type::VEC2, "edgeStart")
7  .smooth(Type::VEC4, "finalColor")
8  .no_perspective(Type::VEC2, "edgePos");
9 
10 GPU_SHADER_CREATE_INFO(overlay_wireframe)
11  .do_static_compilation(true)
12  .push_constant(Type::FLOAT, "wireStepParam")
13  .push_constant(Type::FLOAT, "wireOpacity")
14  .push_constant(Type::BOOL, "useColoring")
15  .push_constant(Type::BOOL, "isTransform")
16  .push_constant(Type::BOOL, "isObjectColor")
17  .push_constant(Type::BOOL, "isRandomColor")
18  .push_constant(Type::BOOL, "isHair")
19  .push_constant(Type::MAT4, "hairDupliMatrix")
20  /* Scene Depth texture copy for manual depth test. */
21  .sampler(0, ImageType::DEPTH_2D, "depthTex")
22  .vertex_in(0, Type::VEC3, "pos")
23  .vertex_in(1, Type::VEC3, "nor")
24  .vertex_in(2, Type::FLOAT, "wd") /* wire-data. */
25  .vertex_out(overlay_wireframe_iface)
26  .vertex_source("overlay_wireframe_vert.glsl")
27  .fragment_source("overlay_wireframe_frag.glsl")
28  .fragment_out(0, Type::VEC4, "fragColor")
29  .fragment_out(1, Type::VEC4, "lineOutput")
30  .additional_info("draw_mesh", "draw_object_infos", "draw_globals");
31 
32 GPU_SHADER_CREATE_INFO(overlay_wireframe_clipped)
33  .do_static_compilation(true)
34  .additional_info("overlay_wireframe", "drw_clipped");
35 
36 GPU_SHADER_CREATE_INFO(overlay_wireframe_custom_depth)
37  .do_static_compilation(true)
38  .define("CUSTOM_DEPTH_BIAS")
39  .additional_info("overlay_wireframe");
40 
41 GPU_SHADER_CREATE_INFO(overlay_wireframe_custom_depth_clipped)
42  .do_static_compilation(true)
43  .additional_info("overlay_wireframe_custom_depth", "drw_clipped");
44 
45 GPU_SHADER_CREATE_INFO(overlay_wireframe_select)
46  .do_static_compilation(true)
47  .define("SELECT_EDGES")
48  .additional_info("overlay_wireframe");
49 
50 GPU_SHADER_CREATE_INFO(overlay_wireframe_select_clipped)
51  .do_static_compilation(true)
52  .additional_info("overlay_wireframe_select", "drw_clipped");
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)
@ FLOAT