diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-05-01 20:35:31 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-05-01 20:35:37 +0300 |
commit | 631506d9c38932cf7c4fa8cb0e96d348efb82b6c (patch) | |
tree | 69bc3b78500d9258dd5d6370d5f4ead3380dca30 /source/blender/draw/engines/external/external_engine.c | |
parent | eba06fee4996087febaa4cdb57bd0388f226cff1 (diff) |
External Engine: Reuse depth only shader from Basic engine
This removes the usage of `GPU_shader_create_from_info_name()`.
Diffstat (limited to 'source/blender/draw/engines/external/external_engine.c')
-rw-r--r-- | source/blender/draw/engines/external/external_engine.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/draw/engines/external/external_engine.c b/source/blender/draw/engines/external/external_engine.c index 994dfb7ad9b..9f2f2b4b23d 100644 --- a/source/blender/draw/engines/external/external_engine.c +++ b/source/blender/draw/engines/external/external_engine.c @@ -103,16 +103,8 @@ static void external_engine_init(void *vedata) /* Depth pre-pass. */ if (!e_data.depth_sh) { - const GPUShaderConfigData *sh_cfg = &GPU_shader_cfg_data[GPU_SHADER_CFG_DEFAULT]; - - e_data.depth_sh = GPU_shader_create_from_arrays({ - .vert = (const char *[]){sh_cfg->lib, - datatoc_common_view_lib_glsl, - datatoc_depth_vert_glsl, - NULL}, - .frag = (const char *[]){datatoc_depth_frag_glsl, NULL}, - .defs = (const char *[]){sh_cfg->def, NULL}, - }); + /* NOTE: Reuse Basic engine depth only shader. */ + e_data.depth_sh = GPU_shader_create_from_info_name("basic_depth_mesh"); } if (!stl->g_data) { |