|
Blender V4.3
|
Go to the source code of this file.
Functions | |
Resource ID | |
This is used to fetch per object data in drw_matrices and other object indexed buffers. There is multiple possibilities depending on how we are drawing the object. | |
| GPU_SHADER_CREATE_INFO (draw_resource_id).define("DYNAMIC_RESOURCE_ID") | |
| flat (Type::INT, "resource_index") | |
| vertex_out (draw_resource_id_iface) .geometry_out(draw_resource_id_iface) | |
Draw View | |
| uniform_buf (DRW_VIEW_UBO_SLOT, "ViewMatrices", "drw_view_[DRW_VIEW_LEN]", Frequency::PASS) .define("DRAW_VIEW_CREATE_INFO") .define("drw_view" | |
| drw_view_[drw_view_id] | typedef_source ("draw_shader_shared.hh") |
| uniform_buf (DRW_VIEW_CULLING_UBO_SLOT, "ViewCullingData", "drw_view_culling_[DRW_VIEW_LEN]") .define("DRW_VIEW_CULLING_INFO") .define("drw_view_culling" | |
| uniform_buf (DRW_OBJ_MAT_UBO_SLOT, "ObjectMatrices", "drw_matrices[DRW_RESOURCE_CHUNK_LEN]", Frequency::BATCH) .define("ModelMatrix" | |
| drw_matrices[resource_id] model | define ("ModelMatrixInverse", "(drw_matrices[resource_id].model_inverse)") .additional_info("draw_view") |
| uniform_buf (DRW_CLIPPING_UBO_SLOT, "vec4", "drw_clipping_[6]", Frequency::PASS) .define("USE_WORLD_CLIP_PLANES") | |
Draw Object Resources | |
| drw_matrix_buf[] | define ("DRAW_MODELMAT_CREATE_INFO") .define("drw_ModelMatrixInverse" |
| drw_matrix_buf[] drw_matrix_buf[resource_id] model_inverse | define ("drw_ModelMatrix", "drw_matrix_buf[resource_id].model") .define("ModelMatrixInverse" |
| drw_matrix_buf[] drw_matrix_buf[resource_id] model_inverse drw_ModelMatrixInverse | define ("ModelMatrix", "drw_ModelMatrix") |
| additional_info ("draw_modelmat_new_common", "draw_resource_id_new") | |
| additional_info ("draw_modelmat_new_common", "draw_resource_with_custom_id_new") | |
Draw Globals | |
| GlobalsUboStorage | |
| globalsBlock | |
| typedef_source ("draw_common_shader_shared.hh") .uniform_buf(7 | |
Geometry Type | |
| draw_resource_id | |
| hairPointBuffer push_constant(Type::INT, "hairStrandsRes") .push_constant(Type hairPointBuffer push_constant(Type::INT, "hairStrandsRes") .push_constant(Type | draw_resource_id_uniform |
| GPU_SHADER_CREATE_INFO (draw_mesh).additional_info("draw_modelmat" | |
| GPU_SHADER_CREATE_INFO (draw_mesh_new).additional_info("draw_modelmat_new" | |
| define ("HAIR_SHADER") .define("DRW_HAIR_INFO") .sampler(15 | |
| hairPointBuffer push_constant(Type::INT, "hairStrandsRes") .push_constant(Type hairPointBuffer push_constant(Type::INT, "hairStrandsRes") .push_constant(Type | sampler (0, ImageType::FLOAT_BUFFER, "ptcloud_pos_rad_tx", Frequency::BATCH) .define("POINTCLOUD_SHADER") .define("DRW_POINTCLOUD_INFO") .additional_info("draw_modelmat_instanced_attr" |
| GPU_SHADER_CREATE_INFO (draw_volume).additional_info("draw_modelmat" | |
| additional_info ("draw_modelmat_new", "draw_resource_handle_new") | |
| typedef_source ("gpencil_shader_shared.h") .define("DRW_GPENCIL_INFO") .sampler(0 | |
Internal Draw Manager usage | |
| ObjectMatrices | |
| matrix_buf[] | ObjectInfos |
| ViewCullingData | |
| ObjectBounds | |
| bounds_buf[] storage_buf(1, Qualifier::READ_WRITE, "uint", "visibility_buf[]") .push_constant(Type | DrawGroup |
| bounds_buf[] storage_buf(1, Qualifier::READ_WRITE, "uint", "visibility_buf[]") .push_constant(Type group_buf[] | DrawPrototype |
| bounds_buf[] storage_buf(1, Qualifier::READ_WRITE, "uint", "visibility_buf[]") .push_constant(Type group_buf[] prototype_buf[] | uint |
| do_static_compilation (true) .typedef_source("draw_shader_shared.hh") .define("DRAW_FINALIZE_SHADER") .local_group_size(DRW_FINALIZE_GROUP_SIZE) .storage_buf(0 | |
| matrix_buf[] | storage_buf (1, Qualifier::READ_WRITE, "ObjectBounds", "bounds_buf[]") .storage_buf(2 |
| matrix_buf[] infos_buf[] | push_constant (Type::INT, "resource_len") .compute_source("draw_resource_finalize_comp.glsl") |
| STRINGIFY (DRW_VIEW_MAX)) .storage_buf(0 | |
| view_culling_buf[DRW_VIEW_LEN] | compute_source ("draw_view_finalize_comp.glsl") .additional_info("draw_view") |
| bounds_buf[] storage_buf(1, Qualifier::READ_WRITE, "uint", "visibility_buf[]") .push_constant(Type group_buf[] | storage_buf (1, Qualifier::READ, "uint", "visibility_buf[]") .storage_buf(2 |
| bounds_buf[] storage_buf(1, Qualifier::READ_WRITE, "uint", "visibility_buf[]") .push_constant(Type group_buf[] prototype_buf[] | storage_buf (3, Qualifier::WRITE, "DrawCommand", "command_buf[]") .storage_buf(DRW_RESOURCE_ID_SLOT |
Draw Resource ID | |
New implementation using gl_BaseInstance and storage buffers. | |
| int | |
| int2 | |
| resource_id_buf[] resource_id_buf[gpu_BaseInstance+gl_InstanceID] | y |
| drw_ResourceID | |
| define ("UNIFORM_RESOURCE_ID_NEW") .storage_buf(DRW_RESOURCE_ID_SLOT | |
| resource_id_buf[] | define ("drw_ResourceID", "resource_id_buf[gpu_BaseInstance + gl_InstanceID]") |
| resource_id_buf[] | define ("drw_ResourceID", "resource_id_buf[gpu_BaseInstance + gl_InstanceID].x") .define("drw_CustomID" |
| vertex_in_drw_ResourceID | define ("drw_ResourceID", "vertex_in_drw_ResourceID.x") .define("drw_CustomID" |
| GPU_SHADER_CREATE_INFO (draw_resource_handle_new).define("resource_handle" | |
| additional_info | ( | "draw_modelmat_new" | , |
| "draw_resource_handle_new" | ) |
| additional_info | ( | "draw_modelmat_new_common" | , |
| "draw_resource_id_new" | ) |
| additional_info | ( | "draw_modelmat_new_common" | , |
| "draw_resource_with_custom_id_new" | ) |
| view_culling_buf[DRW_VIEW_LEN] compute_source | ( | "draw_view_finalize_comp.glsl" | ) |
| drw_matrix_buf[] define | ( | "DRAW_MODELMAT_CREATE_INFO" | ) |
| drw_matrix_buf[] drw_matrix_buf[resource_id] model_inverse define | ( | "drw_ModelMatrix" | , |
| "drw_matrix_buf.model" | [resource_id] ) |
| resource_id_buf[] define | ( | "drw_ResourceID" | , |
| "resource_id_buf" | [gpu_BaseInstance+gl_InstanceID] ) |
| resource_id_buf[] define | ( | "drw_ResourceID" | , |
| "resource_id_buf.x" | [gpu_BaseInstance+gl_InstanceID] ) |
| vertex_in_drw_ResourceID define | ( | "drw_ResourceID" | , |
| "vertex_in_drw_ResourceID.x" | ) |
| define | ( | "HAIR_SHADER" | ) |
| drw_matrix_buf[] drw_matrix_buf[resource_id] model_inverse drw_ModelMatrixInverse define | ( | "ModelMatrix" | , |
| "drw_ModelMatrix" | ) |
| drw_matrices[resource_id] model define | ( | "ModelMatrixInverse" | , |
| "(drw_matrices[resource_id].model_inverse)" | ) |
| define | ( | "UNIFORM_RESOURCE_ID_NEW" | ) |
Workaround the lack of gl_BaseInstance by binding the resource_id_buf as vertex buf.
| do_static_compilation | ( | true | ) |
Colors, weights, and Circle of confusion radii for the 4 pixels to scatter. Scaling factor for the bokeh distance. Sprite pixel position with origin at sprite center. In pixels.
| flat | ( | Type::INT | , |
| "resource_index" | ) |
| GPU_SHADER_CREATE_INFO | ( | draw_mesh | ) |
| GPU_SHADER_CREATE_INFO | ( | draw_mesh_new | ) |
| GPU_SHADER_CREATE_INFO | ( | draw_resource_handle_new | ) |
TODO mask view id bits.
| GPU_SHADER_CREATE_INFO | ( | draw_resource_id | ) |
| GPU_SHADER_CREATE_INFO | ( | draw_volume | ) |
| matrix_buf[] infos_buf[] push_constant | ( | Type::INT | , |
| "resource_len" | ) |
| sampler | ( | 0 | , |
| ImageType::FLOAT_BUFFER | , | ||
| "ptcloud_pos_rad_tx" | , | ||
| Frequency::BATCH | ) |
| bounds_buf[] storage_buf(1, Qualifier::READ_WRITE, "uint", "visibility_buf[]") .push_constant(Type group_buf[] storage_buf | ( | 1 | , |
| Qualifier::READ | , | ||
| "uint" | , | ||
| "visibility_buf" | [] ) |
| matrix_buf[] storage_buf | ( | 1 | , |
| Qualifier::READ_WRITE | , | ||
| "ObjectBounds" | , | ||
| "bounds_buf" | [] ) |
| bounds_buf[] storage_buf(1, Qualifier::READ_WRITE, "uint", "visibility_buf[]") .push_constant(Type group_buf[] prototype_buf[] storage_buf | ( | 3 | , |
| Qualifier::WRITE | , | ||
| "DrawCommand" | , | ||
| "command_buf" | [] ) |
| STRINGIFY | ( | DRW_VIEW_MAX | ) |
| typedef_source | ( | "draw_common_shader_shared.hh" | ) |
| drw_view_[drw_view_id] typedef_source | ( | "draw_shader_shared.hh" | ) |
| typedef_source | ( | "gpencil_shader_shared.h" | ) |
| uniform_buf | ( | DRW_CLIPPING_UBO_SLOT | , |
| "vec4" | , | ||
| "drw_clipping_" | [6], | ||
| Frequency::PASS | ) |
| uniform_buf | ( | DRW_OBJ_MAT_UBO_SLOT | , |
| "ObjectMatrices" | , | ||
| "drw_matrices" | [DRW_RESOURCE_CHUNK_LEN], | ||
| Frequency::BATCH | ) |
| uniform_buf | ( | DRW_VIEW_CULLING_UBO_SLOT | , |
| "ViewCullingData" | , | ||
| "drw_view_culling_" | [DRW_VIEW_LEN] ) |
| uniform_buf | ( | DRW_VIEW_UBO_SLOT | , |
| "ViewMatrices" | , | ||
| "drw_view_" | [DRW_VIEW_LEN], | ||
| Frequency::PASS | ) |
| vertex_out | ( | draw_resource_id_iface | ) |
| draw_resource_id |
Definition at line 108 of file draw_view_info.hh.
| draw_resource_id_uniform |
Definition at line 145 of file draw_view_info.hh.
| bounds_buf[] storage_buf(1, Qualifier::READ_WRITE, "uint", "visibility_buf[]") .push_constant(Type DrawGroup |
Definition at line 225 of file draw_view_info.hh.
| bounds_buf[] storage_buf(1, Qualifier::READ_WRITE, "uint", "visibility_buf[]") .push_constant(Type group_buf[] DrawPrototype |
Definition at line 227 of file draw_view_info.hh.
| drw_ResourceID |
Definition at line 263 of file draw_view_info.hh.
| globalsBlock |
Definition at line 100 of file draw_view_info.hh.
| GlobalsUboStorage |
Definition at line 100 of file draw_view_info.hh.
| int |
Definition at line 248 of file draw_view_info.hh.
| int2 |
Definition at line 254 of file draw_view_info.hh.
Referenced by blender::geometry::calc_new_edges(), blender::compositor::compute_bloom_downsample_chain(), blender::nodes::node_composite_viewer_cc::ViewerOperation::compute_domain(), blender::compositor::downsample(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), blender::nodes::node_geo_extrude_mesh_cc::extrude_individual_mesh_faces(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_vertices(), blender::ed::greasepencil::fill_strokes(), blender::compositor::GlareBloomOperation::generate_glare(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::nodes::node_composite_composite_cc::CompositeOperation::get_output_bounds(), blender::nodes::node_composite_viewer_cc::ViewerOperation::get_output_bounds(), grease_pencil_circle_select(), make_int2(), blender::bke::pbvh::pixels::Rows::pack_into(), blender::ed::curves::select_box(), blender::ed::curves::select_box_mask(), blender::ed::curves::select_lasso(), blender::ed::curves::select_lasso_mask(), blender::geometry::update_unselected_edges(), WM_gesture_lasso_modal(), WM_gesture_lasso_path_to_array(), and WM_gesture_polyline_modal().
| ObjectBounds |
Definition at line 212 of file draw_view_info.hh.
| matrix_buf[] ObjectInfos |
Definition at line 196 of file draw_view_info.hh.
| ObjectMatrices |
Definition at line 194 of file draw_view_info.hh.
| bounds_buf[] storage_buf(1, Qualifier::READ_WRITE, "uint", "visibility_buf[]") .push_constant(Type group_buf[] prototype_buf[] uint |
Definition at line 229 of file draw_view_info.hh.
| ViewCullingData |
Definition at line 204 of file draw_view_info.hh.
| vertex_in_drw_ResourceID vertex_in_drw_ResourceID y |
Definition at line 256 of file draw_view_info.hh.