Fix T75832 DRW Hair: Crash caused by shader compilation
This also fix it the volume velocity needles.
This commit is contained in:
parent
cad1ddc1e8
commit
b7d603b41c
Notes:
blender-bot
2023-02-13 22:50:09 +01:00
Referenced by issue #75855, Blender 2.83 beta OSX Hair Crash Referenced by issue #75832, Crash when you select Hair Type in Particle System on macOS
|
@ -1341,6 +1341,7 @@ struct GPUShader *OVERLAY_shader_volume_velocity(bool use_needle)
|
|||
NULL,
|
||||
datatoc_gpu_shader_flat_color_frag_glsl,
|
||||
datatoc_common_view_lib_glsl,
|
||||
"#define blender_srgb_to_framebuffer_space(a) a\n",
|
||||
"#define USE_NEEDLE\n");
|
||||
}
|
||||
else if (!sh_data->volume_velocity_sh) {
|
||||
|
@ -1349,7 +1350,7 @@ struct GPUShader *OVERLAY_shader_volume_velocity(bool use_needle)
|
|||
NULL,
|
||||
datatoc_gpu_shader_flat_color_frag_glsl,
|
||||
datatoc_common_view_lib_glsl,
|
||||
NULL);
|
||||
"#define blender_srgb_to_framebuffer_space(a) a\n");
|
||||
}
|
||||
return (use_needle) ? sh_data->volume_velocity_needle_sh : sh_data->volume_velocity_sh;
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ static GPUShader *hair_refine_shader_get(ParticleRefineShader sh)
|
|||
g_refine_shaders[sh] = DRW_shader_create(vert_with_lib,
|
||||
NULL,
|
||||
datatoc_gpu_shader_3D_smooth_color_frag_glsl,
|
||||
"#define blender_srgb_to_framebuffer_space(a) a\n"
|
||||
"#define HAIR_PHASE_SUBDIV\n"
|
||||
"#define TF_WORKAROUND\n");
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue