Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_shader.c
| Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | typedef struct OVERLAY_Shaders { | ||||
| GPUShader *paint_texture; | GPUShader *paint_texture; | ||||
| GPUShader *paint_vertcol; | GPUShader *paint_vertcol; | ||||
| GPUShader *paint_weight[2]; | GPUShader *paint_weight[2]; | ||||
| GPUShader *paint_wire; | GPUShader *paint_wire; | ||||
| GPUShader *particle_dot; | GPUShader *particle_dot; | ||||
| GPUShader *particle_shape; | GPUShader *particle_shape; | ||||
| GPUShader *pointcloud_dot; | GPUShader *pointcloud_dot; | ||||
| GPUShader *sculpt_mask; | GPUShader *sculpt_mask; | ||||
| GPUShader *sculpt_curves_selection; | |||||
| GPUShader *uniform_color; | GPUShader *uniform_color; | ||||
| GPUShader *volume_velocity_needle_sh; | GPUShader *volume_velocity_needle_sh; | ||||
| GPUShader *volume_velocity_mac_sh; | GPUShader *volume_velocity_mac_sh; | ||||
| GPUShader *volume_velocity_sh; | GPUShader *volume_velocity_sh; | ||||
| GPUShader *volume_gridlines_sh; | GPUShader *volume_gridlines_sh; | ||||
| GPUShader *volume_gridlines_flags_sh; | GPUShader *volume_gridlines_flags_sh; | ||||
| GPUShader *volume_gridlines_range_sh; | GPUShader *volume_gridlines_range_sh; | ||||
| GPUShader *wireframe_select; | GPUShader *wireframe_select; | ||||
| ▲ Show 20 Lines • Show All 686 Lines • ▼ Show 20 Lines | GPUShader *OVERLAY_shader_sculpt_mask(void) | ||||
| OVERLAY_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg]; | OVERLAY_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg]; | ||||
| if (!sh_data->sculpt_mask) { | if (!sh_data->sculpt_mask) { | ||||
| sh_data->sculpt_mask = GPU_shader_create_from_info_name( | sh_data->sculpt_mask = GPU_shader_create_from_info_name( | ||||
| draw_ctx->sh_cfg ? "overlay_sculpt_mask_clipped" : "overlay_sculpt_mask"); | draw_ctx->sh_cfg ? "overlay_sculpt_mask_clipped" : "overlay_sculpt_mask"); | ||||
| } | } | ||||
| return sh_data->sculpt_mask; | return sh_data->sculpt_mask; | ||||
| } | } | ||||
| GPUShader *OVERLAY_shader_sculpt_curves_selection(void) | |||||
| { | |||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | |||||
| OVERLAY_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg]; | |||||
| if (!sh_data->sculpt_curves_selection) { | |||||
jbakker: should be `sculpt_curves_selection` | |||||
| sh_data->sculpt_curves_selection = GPU_shader_create_from_info_name( | |||||
| draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED ? "overlay_sculpt_curves_selection_clipped" : | |||||
| "overlay_sculpt_curves_selection"); | |||||
| } | |||||
| return sh_data->sculpt_curves_selection; | |||||
| } | |||||
| struct GPUShader *OVERLAY_shader_uniform_color(void) | struct GPUShader *OVERLAY_shader_uniform_color(void) | ||||
| { | { | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| OVERLAY_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg]; | OVERLAY_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg]; | ||||
| if (!sh_data->uniform_color) { | if (!sh_data->uniform_color) { | ||||
| sh_data->uniform_color = GPU_shader_create_from_info_name( | sh_data->uniform_color = GPU_shader_create_from_info_name( | ||||
| draw_ctx->sh_cfg ? "overlay_uniform_color_clipped" : "overlay_uniform_color"); | draw_ctx->sh_cfg ? "overlay_uniform_color_clipped" : "overlay_uniform_color"); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 254 Lines • Show Last 20 Lines | |||||
should be sculpt_curves_selection