Eevee: Fix assert with hair drawing
This remove unused clip_block when not needed and the useless ubo bind that were put there for the sake of not crashing.
This commit is contained in:
parent
3eab49dd36
commit
fa0f938b11
|
@ -1005,12 +1005,10 @@ void EEVEE_materials_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
|||
DRWState state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_WIRE;
|
||||
psl->depth_pass = DRW_pass_create("Depth Pass", state);
|
||||
stl->g_data->depth_shgrp = DRW_shgroup_create(e_data.default_prepass_sh, psl->depth_pass);
|
||||
DRW_shgroup_uniform_block(stl->g_data->depth_shgrp, "clip_block", sldata->clip_ubo);
|
||||
|
||||
state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CULL_BACK;
|
||||
psl->depth_pass_cull = DRW_pass_create("Depth Pass Cull", state);
|
||||
stl->g_data->depth_shgrp_cull = DRW_shgroup_create(e_data.default_prepass_sh, psl->depth_pass_cull);
|
||||
DRW_shgroup_uniform_block(stl->g_data->depth_shgrp_cull, "clip_block", sldata->clip_ubo);
|
||||
|
||||
state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CLIP_PLANES | DRW_STATE_WIRE;
|
||||
psl->depth_pass_clip = DRW_pass_create("Depth Pass Clip", state);
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
uniform mat4 ModelViewProjectionMatrix;
|
||||
uniform mat4 ModelMatrix;
|
||||
|
||||
#ifdef CLIP_PLANES
|
||||
/* keep in sync with DRWManager.view_data */
|
||||
layout(std140) uniform clip_block {
|
||||
vec4 ClipPlanes[1];
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef HAIR_SHADER
|
||||
in vec3 pos;
|
||||
|
|
Loading…
Reference in New Issue