Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_shader.c
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | typedef struct OVERLAY_Shaders { | ||||
| GPUShader *gpencil_canvas; | GPUShader *gpencil_canvas; | ||||
| GPUShader *grid; | GPUShader *grid; | ||||
| GPUShader *grid_background; | GPUShader *grid_background; | ||||
| GPUShader *grid_image; | GPUShader *grid_image; | ||||
| GPUShader *image; | GPUShader *image; | ||||
| GPUShader *motion_path_line; | GPUShader *motion_path_line; | ||||
| GPUShader *motion_path_vert; | GPUShader *motion_path_vert; | ||||
| GPUShader *outline_prepass; | GPUShader *outline_prepass; | ||||
| GPUShader *outline_prepass_curves; | |||||
| GPUShader *outline_prepass_gpencil; | GPUShader *outline_prepass_gpencil; | ||||
| GPUShader *outline_prepass_pointcloud; | GPUShader *outline_prepass_pointcloud; | ||||
| GPUShader *outline_prepass_wire; | GPUShader *outline_prepass_wire; | ||||
| GPUShader *outline_detect; | GPUShader *outline_detect; | ||||
| GPUShader *paint_face; | GPUShader *paint_face; | ||||
| GPUShader *paint_point; | GPUShader *paint_point; | ||||
| GPUShader *paint_texture; | GPUShader *paint_texture; | ||||
| GPUShader *paint_vertcol; | GPUShader *paint_vertcol; | ||||
| ▲ Show 20 Lines • Show All 559 Lines • ▼ Show 20 Lines | GPUShader *OVERLAY_shader_outline_prepass(bool use_wire) | ||||
| else if (!sh_data->outline_prepass) { | else if (!sh_data->outline_prepass) { | ||||
| sh_data->outline_prepass = GPU_shader_create_from_info_name( | sh_data->outline_prepass = GPU_shader_create_from_info_name( | ||||
| draw_ctx->sh_cfg ? "overlay_outline_prepass_mesh_clipped" : | draw_ctx->sh_cfg ? "overlay_outline_prepass_mesh_clipped" : | ||||
| "overlay_outline_prepass_mesh"); | "overlay_outline_prepass_mesh"); | ||||
| } | } | ||||
| return use_wire ? sh_data->outline_prepass_wire : sh_data->outline_prepass; | return use_wire ? sh_data->outline_prepass_wire : sh_data->outline_prepass; | ||||
| } | } | ||||
| GPUShader *OVERLAY_shader_outline_prepass_curves() | |||||
| { | |||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | |||||
| OVERLAY_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg]; | |||||
| if (!sh_data->outline_prepass_curves) { | |||||
| sh_data->outline_prepass_curves = GPU_shader_create_from_info_name( | |||||
| draw_ctx->sh_cfg ? "overlay_outline_prepass_curves_clipped" : | |||||
| "overlay_outline_prepass_curves"); | |||||
| } | |||||
| return sh_data->outline_prepass_curves; | |||||
| } | |||||
| GPUShader *OVERLAY_shader_outline_prepass_gpencil(void) | GPUShader *OVERLAY_shader_outline_prepass_gpencil(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->outline_prepass_gpencil) { | if (!sh_data->outline_prepass_gpencil) { | ||||
| sh_data->outline_prepass_gpencil = GPU_shader_create_from_info_name( | sh_data->outline_prepass_gpencil = GPU_shader_create_from_info_name( | ||||
| draw_ctx->sh_cfg ? "overlay_outline_prepass_gpencil_clipped" : | draw_ctx->sh_cfg ? "overlay_outline_prepass_gpencil_clipped" : | ||||
| "overlay_outline_prepass_gpencil"); | "overlay_outline_prepass_gpencil"); | ||||
| ▲ Show 20 Lines • Show All 408 Lines • Show Last 20 Lines | |||||