Blender  V3.3
overlay_outline_info.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
4 
5 /* -------------------------------------------------------------------- */
9 GPU_SHADER_INTERFACE_INFO(overlay_outline_prepass_iface, "interp").flat(Type::UINT, "ob_id");
10 
11 GPU_SHADER_CREATE_INFO(overlay_outline_prepass)
12  .push_constant(Type::BOOL, "isTransform")
13  .vertex_out(overlay_outline_prepass_iface)
14  /* Using uint because 16bit uint can contain more ids than int. */
15  .fragment_out(0, Type::UINT, "out_object_id")
16  .fragment_source("overlay_outline_prepass_frag.glsl")
17  .additional_info("draw_resource_handle");
18 
19 GPU_SHADER_CREATE_INFO(overlay_outline_prepass_mesh)
20  .do_static_compilation(true)
21  .vertex_in(0, Type::VEC3, "pos")
22  .vertex_source("overlay_outline_prepass_vert.glsl")
23  .additional_info("draw_mesh", "overlay_outline_prepass")
24  .additional_info("draw_object_infos");
25 
26 GPU_SHADER_CREATE_INFO(overlay_outline_prepass_mesh_clipped)
27  .do_static_compilation(true)
28  .additional_info("overlay_outline_prepass_mesh", "drw_clipped");
29 
30 GPU_SHADER_INTERFACE_INFO(overlay_outline_prepass_wire_iface, "vert").flat(Type::VEC3, "pos");
31 
32 GPU_SHADER_CREATE_INFO(overlay_outline_prepass_curves)
33  .do_static_compilation(true)
34  .vertex_source("overlay_outline_prepass_curves_vert.glsl")
35  .additional_info("draw_hair", "overlay_outline_prepass")
36  .additional_info("draw_object_infos");
37 
38 GPU_SHADER_CREATE_INFO(overlay_outline_prepass_curves_clipped)
39  .do_static_compilation(true)
40  .additional_info("overlay_outline_prepass_curves", "drw_clipped");
41 
42 GPU_SHADER_CREATE_INFO(overlay_outline_prepass_wire)
43  .do_static_compilation(true)
44  .define("USE_GEOM")
45  .vertex_in(0, Type::VEC3, "pos")
46  .vertex_out(overlay_outline_prepass_wire_iface)
47  .geometry_layout(PrimitiveIn::LINES_ADJACENCY, PrimitiveOut::LINE_STRIP, 2)
48  .geometry_out(overlay_outline_prepass_iface)
49  .vertex_source("overlay_outline_prepass_vert.glsl")
50  .geometry_source("overlay_outline_prepass_geom.glsl")
51  .additional_info("draw_mesh", "overlay_outline_prepass")
52  .additional_info("draw_object_infos");
53 
54 GPU_SHADER_CREATE_INFO(overlay_outline_prepass_wire_clipped)
55  .do_static_compilation(true)
56  .additional_info("overlay_outline_prepass_wire", "drw_clipped");
57 
58 GPU_SHADER_INTERFACE_INFO(overlay_outline_prepass_gpencil_iface, "gp_interp")
59  .no_perspective(Type::VEC2, "thickness")
60  .no_perspective(Type::FLOAT, "hardness")
61  .flat(Type::VEC2, "aspect")
62  .flat(Type::VEC4, "sspos");
63 
64 GPU_SHADER_CREATE_INFO(overlay_outline_prepass_gpencil)
65  .do_static_compilation(true)
66  .push_constant(Type::BOOL, "isTransform")
67  .vertex_out(overlay_outline_prepass_iface)
68  .vertex_out(overlay_outline_prepass_gpencil_iface)
69  .vertex_source("overlay_outline_prepass_gpencil_vert.glsl")
70  .push_constant(Type::BOOL, "gpStrokeOrder3d") /* TODO(fclem): Move to a GPencil object UBO. */
71  .push_constant(Type::VEC4, "gpDepthPlane") /* TODO(fclem): Move to a GPencil object UBO. */
72  /* Using uint because 16bit uint can contain more ids than int. */
73  .fragment_out(0, Type::UINT, "out_object_id")
74  .fragment_source("overlay_outline_prepass_gpencil_frag.glsl")
75  .additional_info("draw_gpencil", "draw_resource_handle");
76 
77 GPU_SHADER_CREATE_INFO(overlay_outline_prepass_gpencil_clipped)
78  .do_static_compilation(true)
79  .additional_info("overlay_outline_prepass_gpencil", "drw_clipped");
80 
81 GPU_SHADER_CREATE_INFO(overlay_outline_prepass_pointcloud)
82  .do_static_compilation(true)
83  .vertex_source("overlay_outline_prepass_pointcloud_vert.glsl")
84  .additional_info("draw_pointcloud", "overlay_outline_prepass")
85  .additional_info("draw_object_infos");
86 
87 GPU_SHADER_CREATE_INFO(overlay_outline_prepass_pointcloud_clipped)
88  .do_static_compilation(true)
89  .additional_info("overlay_outline_prepass_pointcloud", "drw_clipped");
90 
93 /* -------------------------------------------------------------------- */
97 GPU_SHADER_CREATE_INFO(overlay_outline_detect)
98  .do_static_compilation(true)
99  .push_constant(Type::FLOAT, "alphaOcclu")
100  .push_constant(Type::BOOL, "isXrayWires")
101  .push_constant(Type::BOOL, "doAntiAliasing")
102  .push_constant(Type::BOOL, "doThickOutlines")
103  .sampler(0, ImageType::UINT_2D, "outlineId")
104  .sampler(1, ImageType::DEPTH_2D, "outlineDepth")
105  .sampler(2, ImageType::DEPTH_2D, "sceneDepth")
106  .fragment_out(0, Type::VEC4, "fragColor")
107  .fragment_out(1, Type::VEC4, "lineOutput")
108  .fragment_source("overlay_outline_detect_frag.glsl")
109  .additional_info("draw_fullscreen", "draw_view", "draw_globals");
110 
typedef UINT(API *GHOST_WIN32_GetDpiForWindow)(HWND)
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)
@ FLOAT