104 struct BatchDeleter {
105 void operator()(gpu::Batch *shader)
110 using BatchPtr = std::unique_ptr<gpu::Batch, BatchDeleter>;
186 struct ShaderDeleter {
192 using ShaderPtr = std::unique_ptr<GPUShader, ShaderDeleter>;
200 const bool clipping_enabled_;
218 ShaderPtr grid = shader(
"overlay_grid");
281 ShaderPtr
depth_mesh = selectable_shader(
"overlay_depth_mesh");
314 ShaderPtr shader(
const char *create_info_name)
318 ShaderPtr shader(
const char *create_info_name,
320 ShaderPtr selectable_shader(
const char *create_info_name);
321 ShaderPtr selectable_shader(
const char *create_info_name,
402 SelectMap::begin_sync();
410 const bool active = (
state.active_base !=
nullptr) &&
494 if (
state.scene->world) {
499 return state.v3d->shading.background_color;
544 pass.bind_ssbo(
"data_buf", &
data_buf);
558 pass.bind_ssbo(
"data_buf", &
data_buf);
585 pass.bind_ssbo(
"data_buf", &
data_buf);
586 pass.push_constant(
"colorid",
color_id);
void BKE_movieclip_free_gputexture(struct MovieClip *clip)
MINLINE float max_ff(float a, float b)
#define BASE_SELECTED(v3d, base)
@ V3D_SHADING_BACKGROUND_VIEWPORT
@ V3D_SHADING_BACKGROUND_WORLD
#define DRW_SHADER_FREE_SAFE(shader)
#define GPU_BATCH_DISCARD_SAFE(batch)
float GPU_polygon_offset_calc(const float(*winmat)[4], float viewdist, float dist)
GPUShader * GPU_shader_create_from_info_name(const char *info_name)
void UI_GetThemeColor3fv(int colorid, float col[3])
void UI_GetThemeColorBlendShade4fv(int colorid1, int colorid2, float fac, int offset, float col[4])
struct GPUShader GPUShader
void append(const T &value)
ShaderPtr attribute_viewer_pointcloud
ShaderModule(const SelectionType selection_type, const bool clipping_enabled)
ShaderPtr depth_mesh_conservative
ShaderPtr legacy_curve_edit_points
ShaderPtr uv_brush_stencil
ShaderPtr uv_edit_facedot
ShaderPtr armature_envelope_fill
ShaderPtr motion_path_vert
ShaderPtr background_clip_bound
ShaderPtr paint_region_edge
ShaderPtr paint_region_face
ShaderPtr paint_weight_fake_shading
static ShaderModule & module_get(SelectionType selection_type, bool clipping_enabled)
ShaderPtr sculpt_curves_cage
ShaderPtr outline_prepass_gpencil
ShaderPtr legacy_curve_edit_handles
ShaderPtr fluid_velocity_needle
ShaderPtr armature_envelope_outline
ShaderPtr mesh_loop_normal
ShaderPtr fluid_grid_lines_flat
ShaderPtr mesh_face_normal_subdiv
ShaderPtr legacy_curve_edit_normals
ShaderPtr fluid_grid_lines_flags
ShaderPtr outline_prepass_curves
ShaderPtr uv_image_borders
ShaderPtr curve_edit_line
ShaderPtr outline_prepass_wire
ShaderPtr extra_wire_object
ShaderPtr particle_edit_edge
ShaderPtr particle_edit_vert
ShaderPtr uv_analysis_stretch_angle
ShaderPtr armature_sphere_fill
ShaderPtr attribute_viewer_mesh
ShaderPtr mesh_vert_normal
ShaderPtr motion_path_line
ShaderPtr fluid_velocity_mac
ShaderPtr fluid_grid_lines_range
ShaderPtr uniform_color_batch
ShaderPtr fluid_velocity_streamline
ShaderPtr wireframe_points
static void module_free()
ShaderPtr armature_shape_fill
ShaderPtr depth_grease_pencil
ShaderPtr wireframe_curve
ShaderPtr attribute_viewer_curves
ShaderPtr mesh_face_normal
ShaderPtr armature_sphere_outline
ShaderPtr armature_degrees_of_freedom
ShaderPtr armature_shape_wire
ShaderPtr mesh_edit_skin_root
ShaderPtr depth_point_cloud
ShaderPtr legacy_curve_edit_wires
ShaderPtr extra_ground_line
ShaderPtr curve_edit_points
ShaderPtr curve_edit_handles
ShaderPtr outline_prepass_mesh
ShaderPtr mesh_edit_depth
ShaderPtr background_fill
ShaderPtr paint_region_vert
ShaderPtr outline_prepass_pointcloud
ShaderPtr grid_background
ShaderPtr grid_grease_pencil
ShaderPtr mesh_loop_normal_subdiv
ShaderPtr uv_analysis_stretch_area
ShaderPtr armature_shape_outline
ShaderPtr attribute_viewer_curve
ShaderPtr mesh_edit_facedot
ShaderPtr extra_loose_points
BatchPtr light_point_lines
BatchPtr camera_volume_wire
BatchPtr camera_tria_wire
BatchPtr field_tube_limit
BatchPtr light_area_square_lines
BatchPtr bone_degrees_of_freedom_wire
BatchPtr bone_degrees_of_freedom
BatchPtr field_sphere_limit
BatchPtr light_icon_sun_rays
BatchPtr light_icon_inner_lines
BatchPtr light_area_disk_lines
BatchPtr bone_sphere_wire
BatchPtr lightprobe_planar
BatchPtr metaball_wire_circle
BatchPtr sphere_low_detail
BatchPtr light_spot_lines
BatchPtr light_icon_outer_lines
BatchPtr light_spot_volume
BatchPtr field_cone_limit
BatchPtr camera_distances
BatchPtr bone_octahedron_wire
BatchPtr bone_envelope_wire
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)
static float4x4 winmat_polygon_offset(float4x4 winmat, float view_dist, float offset)
VecBase< float, 4 > float4
VecBase< float, 3 > float3
const c_style_mat & ptr() const
void append(const float3 &start, const float3 &end, const float4 &color, select::ID select_id=select::SelectMap::select_invalid_id())
void append(const float3 &start, const float3 &end, const int color_id, select::ID select_id=select::SelectMap::select_invalid_id())
void end_sync(PassSimple::Sub &pass)
LinePrimitiveBuf(const SelectionType selection_type, const char *name=nullptr)
void end_sync(PassSimple::Sub &pass)
PointPrimitiveBuf(const SelectionType selection_type, const char *name=nullptr)
void append(const float3 &position, const int color_id, select::ID select_id)
void append(const float3 &position, const float4 &color, select::ID select_id=select::SelectMap::select_invalid_id())
Framebuffer overlay_line_in_front_fb
TextureRef weight_ramp_tx
Framebuffer overlay_line_only_fb
float4 background_color_get(const State &state)
TextureRef depth_target_tx
Framebuffer overlay_color_only_fb
const float4 & object_wire_color(const ObjectRef &ob_ref, ThemeColorID theme_id) const
GPUUniformBuf * globals_buf
const float4 & object_wire_color(const ObjectRef &ob_ref, const State &state) const
TextureFromPool color_render_alloc_tx
TextureRef depth_target_in_front_tx
Framebuffer overlay_output_fb
TextureFromPool xray_depth_tx
Vector< MovieClip * > bg_movie_clips
GPUFrameBuffer * render_in_front_fb
TextureFromPool overlay_tx
Framebuffer overlay_in_front_fb
TextureRef color_render_tx
float4 object_background_blend_color(const ObjectRef &ob_ref, const State &state) const
TextureRef color_overlay_tx
TextureFromPool depth_in_front_alloc_tx
GlobalsUboStorage theme_settings
TextureRef depth_in_front_tx
GPUFrameBuffer * render_fb
float4 background_blend_color(ThemeColorID theme_id) const
Resources(const SelectionType selection_type_, ShaderModule &shader_module)
ThemeColorID object_wire_theme_id(const ObjectRef &ob_ref, const State &state) const
TextureFromPool color_overlay_alloc_tx
Framebuffer overlay_line_fb
void free_movieclips_textures()
ShapeInstanceBuf(const SelectionType selection_type, const char *name=nullptr)
void end_sync(PassSimple::Sub &pass, gpu::Batch *shape)
StorageVectorBuffer< InstanceDataT > data_buf
void append(const InstanceDataT &data, select::ID select_id)
void end_sync(PassSimple::Sub &pass, gpu::Batch *shape, GPUPrimType primitive_type, uint primitive_len)
const ViewLayer * view_layer
bool xray_enabled_and_not_wire
const SpaceLink * space_data
const Object * object_active
float view_dist_get(const float4x4 &winmat) const
eContextObjectMode ctx_mode
const RegionView3D * rv3d
void end_sync(PassSimple::Sub &pass, GPUPrimType primitive)
select::SelectBuf select_buf
void append(const float3 &position, const float4 &color)
VertexPrimitiveBuf(const SelectionType selection_type, const char *name=nullptr)
StorageVectorBuffer< VertexData > data_buf
void select_append(ID select_id)
void select_bind(PassSimple::Sub &pass)
SelectBuf(const SelectionType selection_type)
const SelectionType selection_type
static const ID select_invalid_id()
SelectMap(const SelectionType selection_type)
Describe inputs & outputs, stage interfaces, resources and sources of a shader. If all data is correc...