Cleanup: DRW: Rename DRW_STATE_BLEND_* for API clarity
This commit is contained in:
@@ -204,7 +204,7 @@ void EEVEE_depth_of_field_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_
|
||||
DRW_shgroup_uniform_vec2(grp, "dofParams", effects->dof_params, 1);
|
||||
DRW_shgroup_call(grp, quad, NULL);
|
||||
|
||||
DRW_PASS_CREATE(psl->dof_scatter, DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE_FULL);
|
||||
DRW_PASS_CREATE(psl->dof_scatter, DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ADD_FULL);
|
||||
|
||||
/* This create an empty batch of N triangles to be positioned
|
||||
* by the vertex shader 0.4ms against 6ms with instancing */
|
||||
|
||||
@@ -344,7 +344,8 @@ void EEVEE_effects_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
||||
copy_v4_fl4(effects->color_checker_dark, 0.15f, 0.15f, 0.15f, 1.0f);
|
||||
copy_v4_fl4(effects->color_checker_light, 0.2f, 0.2f, 0.2f, 1.0f);
|
||||
|
||||
DRW_PASS_CREATE(psl->alpha_checker, DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_PREMUL_UNDER);
|
||||
DRW_PASS_CREATE(psl->alpha_checker,
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA_UNDER_PREMUL);
|
||||
grp = DRW_shgroup_create(checker_sh, psl->alpha_checker);
|
||||
DRW_shgroup_uniform_vec4(grp, "color1", effects->color_checker_dark, 1);
|
||||
DRW_shgroup_uniform_vec4(grp, "color2", effects->color_checker_light, 1);
|
||||
|
||||
@@ -1476,8 +1476,8 @@ static void material_transparent(Material *ma,
|
||||
const bool use_prepass = ((ma->blend_flag & MA_BL_HIDE_BACKFACE) != 0);
|
||||
|
||||
DRWState all_state = (DRW_STATE_WRITE_DEPTH | DRW_STATE_WRITE_COLOR | DRW_STATE_CULL_BACK |
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND |
|
||||
DRW_STATE_ADDITIVE | DRW_STATE_MULTIPLY);
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_DEPTH_EQUAL |
|
||||
DRW_STATE_BLEND_ALPHA | DRW_STATE_BLEND_ADD | DRW_STATE_BLEND_MUL);
|
||||
|
||||
DRWState cur_state = DRW_STATE_WRITE_COLOR;
|
||||
cur_state |= (use_prepass) ? DRW_STATE_DEPTH_EQUAL : DRW_STATE_DEPTH_LESS_EQUAL;
|
||||
@@ -1485,13 +1485,13 @@ static void material_transparent(Material *ma,
|
||||
|
||||
switch (ma->blend_method) {
|
||||
case MA_BM_ADD:
|
||||
cur_state |= DRW_STATE_ADDITIVE;
|
||||
cur_state |= DRW_STATE_BLEND_ADD;
|
||||
break;
|
||||
case MA_BM_MULTIPLY:
|
||||
cur_state |= DRW_STATE_MULTIPLY;
|
||||
cur_state |= DRW_STATE_BLEND_MUL;
|
||||
break;
|
||||
case MA_BM_BLEND:
|
||||
cur_state |= DRW_STATE_BLEND;
|
||||
cur_state |= DRW_STATE_BLEND_ALPHA;
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
|
||||
@@ -106,7 +106,7 @@ void EEVEE_mist_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
||||
g_data->mist_falloff *= 0.5f;
|
||||
|
||||
/* Create Pass and shgroup. */
|
||||
DRW_PASS_CREATE(psl->mist_accum_ps, DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE);
|
||||
DRW_PASS_CREATE(psl->mist_accum_ps, DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ADD);
|
||||
DRWShadingGroup *grp = DRW_shgroup_create(e_data.mist_sh, psl->mist_accum_ps);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &dtxl->depth);
|
||||
DRW_shgroup_uniform_block(grp, "common_block", sldata->common_ubo);
|
||||
|
||||
@@ -157,7 +157,7 @@ void EEVEE_occlusion_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata
|
||||
GPU_framebuffer_clear_color(fbl->ao_accum_fb, clear);
|
||||
|
||||
/* Accumulation pass */
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ADD;
|
||||
DRW_PASS_CREATE(psl->ao_accum_ps, state);
|
||||
DRWShadingGroup *grp = DRW_shgroup_create(e_data.gtao_debug_sh, psl->ao_accum_ps);
|
||||
DRW_shgroup_uniform_texture(grp, "utilTex", EEVEE_materials_get_util_tex());
|
||||
|
||||
@@ -232,7 +232,7 @@ void EEVEE_screen_raytrace_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *v
|
||||
}
|
||||
DRW_shgroup_call(grp, quad, NULL);
|
||||
|
||||
DRW_PASS_CREATE(psl->ssr_resolve, DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE);
|
||||
DRW_PASS_CREATE(psl->ssr_resolve, DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ADD);
|
||||
grp = DRW_shgroup_create(resolve_shader, psl->ssr_resolve);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &e_data.depth_src);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "normalBuffer", &effects->ssr_normal_input);
|
||||
|
||||
@@ -200,8 +200,8 @@ void EEVEE_subsurface_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data
|
||||
*/
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_STENCIL_EQUAL;
|
||||
DRW_PASS_CREATE(psl->sss_blur_ps, state);
|
||||
DRW_PASS_CREATE(psl->sss_resolve_ps, state | DRW_STATE_ADDITIVE);
|
||||
DRW_PASS_CREATE(psl->sss_accum_ps, state | DRW_STATE_ADDITIVE);
|
||||
DRW_PASS_CREATE(psl->sss_resolve_ps, state | DRW_STATE_BLEND_ADD);
|
||||
DRW_PASS_CREATE(psl->sss_accum_ps, state | DRW_STATE_BLEND_ADD);
|
||||
}
|
||||
|
||||
void EEVEE_subsurface_add_pass(EEVEE_ViewLayerData *sldata,
|
||||
|
||||
@@ -330,7 +330,7 @@ void EEVEE_volumes_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
||||
|
||||
/* World pass is not additive as it also clear the buffer. */
|
||||
DRW_PASS_CREATE(psl->volumetric_world_ps, DRW_STATE_WRITE_COLOR);
|
||||
DRW_PASS_CREATE(psl->volumetric_objects_ps, DRW_STATE_WRITE_COLOR | DRW_STATE_ADDITIVE);
|
||||
DRW_PASS_CREATE(psl->volumetric_objects_ps, DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ADD);
|
||||
|
||||
/* World Volumetric */
|
||||
struct World *wo = scene->world;
|
||||
|
||||
@@ -352,16 +352,17 @@ void GPENCIL_cache_init(void *vedata)
|
||||
/* Stroke pass 2D */
|
||||
psl->stroke_pass_2d = DRW_pass_create("GPencil Stroke Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH |
|
||||
DRW_STATE_DEPTH_ALWAYS | DRW_STATE_BLEND);
|
||||
DRW_STATE_DEPTH_ALWAYS | DRW_STATE_BLEND_ALPHA);
|
||||
stl->storage->shgroup_id = 0;
|
||||
/* Stroke pass 3D */
|
||||
psl->stroke_pass_3d = DRW_pass_create("GPencil Stroke Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH |
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND);
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA);
|
||||
stl->storage->shgroup_id = 0;
|
||||
|
||||
/* edit pass */
|
||||
psl->edit_pass = DRW_pass_create("GPencil Edit Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND);
|
||||
psl->edit_pass = DRW_pass_create("GPencil Edit Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA);
|
||||
|
||||
/* detect if playing animation */
|
||||
if (draw_ctx->evil_C) {
|
||||
@@ -453,13 +454,13 @@ void GPENCIL_cache_init(void *vedata)
|
||||
* is stored in sbuffer
|
||||
*/
|
||||
psl->drawing_pass = DRW_pass_create("GPencil Drawing Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND |
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA |
|
||||
DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS);
|
||||
|
||||
/* full screen pass to combine the result with default framebuffer */
|
||||
struct GPUBatch *quad = DRW_cache_fullscreen_quad_get();
|
||||
psl->mix_pass = DRW_pass_create("GPencil Mix Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND |
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA |
|
||||
DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
|
||||
DRWShadingGroup *mix_shgrp = DRW_shgroup_create(e_data.gpencil_fullscreen_sh, psl->mix_pass);
|
||||
DRW_shgroup_call(mix_shgrp, quad, NULL);
|
||||
@@ -494,7 +495,7 @@ void GPENCIL_cache_init(void *vedata)
|
||||
* is far to agile.
|
||||
*/
|
||||
psl->background_pass = DRW_pass_create("GPencil Background Painting Session Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND |
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA |
|
||||
DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
|
||||
DRWShadingGroup *background_shgrp = DRW_shgroup_create(e_data.gpencil_background_sh,
|
||||
psl->background_pass);
|
||||
@@ -509,7 +510,7 @@ void GPENCIL_cache_init(void *vedata)
|
||||
*/
|
||||
if (v3d) {
|
||||
psl->paper_pass = DRW_pass_create("GPencil Paper Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND);
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA);
|
||||
DRWShadingGroup *paper_shgrp = DRW_shgroup_create(e_data.gpencil_paper_sh, psl->paper_pass);
|
||||
DRW_shgroup_call(paper_shgrp, quad, NULL);
|
||||
DRW_shgroup_uniform_vec3(paper_shgrp, "color", v3d->shading.background_color, 1);
|
||||
@@ -519,14 +520,14 @@ void GPENCIL_cache_init(void *vedata)
|
||||
/* grid pass */
|
||||
if (v3d) {
|
||||
psl->grid_pass = DRW_pass_create("GPencil Grid Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND |
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA |
|
||||
DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS);
|
||||
stl->g_data->shgrps_grid = DRW_shgroup_create(e_data.gpencil_line_sh, psl->grid_pass);
|
||||
}
|
||||
|
||||
/* blend layers pass */
|
||||
psl->blend_pass = DRW_pass_create("GPencil Blend Layers Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND |
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA |
|
||||
DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
|
||||
DRWShadingGroup *blend_shgrp = DRW_shgroup_create(e_data.gpencil_blend_fullscreen_sh,
|
||||
psl->blend_pass);
|
||||
|
||||
@@ -709,7 +709,7 @@ void GPENCIL_create_fx_passes(GPENCIL_PassList *psl)
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH |
|
||||
DRW_STATE_DEPTH_LESS);
|
||||
psl->fx_shader_pass_blend = DRW_pass_create("GPencil Shader FX Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND |
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA |
|
||||
DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS);
|
||||
}
|
||||
|
||||
|
||||
@@ -755,9 +755,9 @@ void workbench_deferred_cache_init(WORKBENCH_Data *vedata)
|
||||
/* Stencil Shadow passes. */
|
||||
#ifdef DEBUG_SHADOW_VOLUME
|
||||
DRWState depth_pass_state = DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_COLOR |
|
||||
DRW_STATE_ADDITIVE;
|
||||
DRW_STATE_BLEND_ADD;
|
||||
DRWState depth_fail_state = DRW_STATE_DEPTH_GREATER_EQUAL | DRW_STATE_WRITE_COLOR |
|
||||
DRW_STATE_ADDITIVE;
|
||||
DRW_STATE_BLEND_ADD;
|
||||
#else
|
||||
DRWState depth_pass_state = DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_STENCIL_SHADOW_PASS;
|
||||
DRWState depth_fail_state = DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_STENCIL_SHADOW_FAIL;
|
||||
@@ -830,7 +830,7 @@ void workbench_deferred_cache_init(WORKBENCH_Data *vedata)
|
||||
}
|
||||
/* OIT Composite */
|
||||
{
|
||||
int state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND;
|
||||
int state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA;
|
||||
psl->oit_composite_pass = DRW_pass_create("OIT Composite", state);
|
||||
|
||||
grp = DRW_shgroup_create(e_data.oit_resolve_sh, psl->oit_composite_pass);
|
||||
|
||||
@@ -298,7 +298,8 @@ void workbench_dof_create_pass(WORKBENCH_Data *vedata,
|
||||
psl->dof_dilate_v_ps = DRW_pass_create("DoF Dilate Coc V", DRW_STATE_WRITE_COLOR);
|
||||
psl->dof_blur1_ps = DRW_pass_create("DoF Blur 1", DRW_STATE_WRITE_COLOR);
|
||||
psl->dof_blur2_ps = DRW_pass_create("DoF Blur 2", DRW_STATE_WRITE_COLOR);
|
||||
psl->dof_resolve_ps = DRW_pass_create("DoF Resolve", DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND);
|
||||
psl->dof_resolve_ps = DRW_pass_create("DoF Resolve",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA);
|
||||
|
||||
{
|
||||
DRWShadingGroup *grp = DRW_shgroup_create(e_data.effect_dof_prepare_sh, psl->dof_down_ps);
|
||||
|
||||
@@ -111,7 +111,7 @@ void workbench_volume_engine_free(void)
|
||||
void workbench_volume_cache_init(WORKBENCH_Data *vedata)
|
||||
{
|
||||
vedata->psl->volume_pass = DRW_pass_create(
|
||||
"Volumes", DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_PREMUL | DRW_STATE_CULL_FRONT);
|
||||
"Volumes", DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA_PREMUL | DRW_STATE_CULL_FRONT);
|
||||
}
|
||||
|
||||
void workbench_volume_cache_populate(WORKBENCH_Data *vedata,
|
||||
|
||||
@@ -336,15 +336,16 @@ typedef enum {
|
||||
DRW_STATE_STENCIL_NEQUAL = (1 << 14),
|
||||
|
||||
/** Blend state */
|
||||
DRW_STATE_ADDITIVE = (1 << 15),
|
||||
DRW_STATE_BLEND_ADD = (1 << 15),
|
||||
/** Same as additive but let alpha accumulate without premult. */
|
||||
DRW_STATE_ADDITIVE_FULL = (1 << 16),
|
||||
DRW_STATE_BLEND = (1 << 17),
|
||||
DRW_STATE_BLEND_ADD_FULL = (1 << 16),
|
||||
/** Standard alpha blending. */
|
||||
DRW_STATE_BLEND_ALPHA = (1 << 17),
|
||||
/** Use that if color is already premult by alpha. */
|
||||
DRW_STATE_BLEND_PREMUL = (1 << 18),
|
||||
DRW_STATE_BLEND_PREMUL_UNDER = (1 << 19),
|
||||
DRW_STATE_BLEND_ALPHA_PREMUL = (1 << 18),
|
||||
DRW_STATE_BLEND_ALPHA_UNDER_PREMUL = (1 << 19),
|
||||
DRW_STATE_BLEND_OIT = (1 << 20),
|
||||
DRW_STATE_MULTIPLY = (1 << 21),
|
||||
DRW_STATE_BLEND_MUL = (1 << 21),
|
||||
|
||||
DRW_STATE_CLIP_PLANES = (1 << 22),
|
||||
DRW_STATE_WIRE_SMOOTH = (1 << 23),
|
||||
|
||||
@@ -501,7 +501,7 @@ struct DRWCallBuffer *buffer_instance(DRWPass *pass,
|
||||
});
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_create(sh_inst, pass);
|
||||
DRW_shgroup_state_disable(grp, DRW_STATE_BLEND);
|
||||
DRW_shgroup_state_disable(grp, DRW_STATE_BLEND_ALPHA);
|
||||
if (sh_cfg == GPU_SHADER_CFG_CLIPPED) {
|
||||
DRW_shgroup_state_enable(grp, DRW_STATE_CLIP_PLANES);
|
||||
}
|
||||
@@ -969,7 +969,7 @@ struct DRWCallBuffer *buffer_instance_bone_dof(struct DRWPass *pass,
|
||||
|
||||
DRWShadingGroup *grp = DRW_shgroup_create(sh_data->bone_dofs, pass);
|
||||
if (blend) {
|
||||
DRW_shgroup_state_enable(grp, DRW_STATE_BLEND);
|
||||
DRW_shgroup_state_enable(grp, DRW_STATE_BLEND_ALPHA);
|
||||
DRW_shgroup_state_disable(grp, DRW_STATE_CULL_FRONT);
|
||||
}
|
||||
return DRW_shgroup_call_buffer_instance(grp, g_formats.instance_bone_dof, geom);
|
||||
|
||||
@@ -385,7 +385,7 @@ void DRW_transform_none(GPUTexture *tex)
|
||||
*/
|
||||
void DRW_multisamples_resolve(GPUTexture *src_depth, GPUTexture *src_color, bool use_depth)
|
||||
{
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_PREMUL;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA_PREMUL;
|
||||
|
||||
if (use_depth) {
|
||||
state |= DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL;
|
||||
|
||||
@@ -183,26 +183,27 @@ void drw_state_set(DRWState state)
|
||||
/* Blending (all buffer) */
|
||||
{
|
||||
int test;
|
||||
if (CHANGED_ANY_STORE_VAR(DRW_STATE_BLEND | DRW_STATE_BLEND_PREMUL | DRW_STATE_ADDITIVE |
|
||||
DRW_STATE_MULTIPLY | DRW_STATE_ADDITIVE_FULL |
|
||||
DRW_STATE_BLEND_OIT | DRW_STATE_BLEND_PREMUL_UNDER,
|
||||
if (CHANGED_ANY_STORE_VAR(DRW_STATE_BLEND_ALPHA | DRW_STATE_BLEND_ALPHA_PREMUL |
|
||||
DRW_STATE_BLEND_ADD | DRW_STATE_BLEND_MUL |
|
||||
DRW_STATE_BLEND_ADD_FULL | DRW_STATE_BLEND_OIT |
|
||||
DRW_STATE_BLEND_ALPHA_UNDER_PREMUL,
|
||||
test)) {
|
||||
if (test) {
|
||||
glEnable(GL_BLEND);
|
||||
|
||||
if ((state & DRW_STATE_BLEND) != 0) {
|
||||
if ((state & DRW_STATE_BLEND_ALPHA) != 0) {
|
||||
glBlendFuncSeparate(GL_SRC_ALPHA,
|
||||
GL_ONE_MINUS_SRC_ALPHA, /* RGB */
|
||||
GL_ONE,
|
||||
GL_ONE_MINUS_SRC_ALPHA); /* Alpha */
|
||||
}
|
||||
else if ((state & DRW_STATE_BLEND_PREMUL_UNDER) != 0) {
|
||||
else if ((state & DRW_STATE_BLEND_ALPHA_UNDER_PREMUL) != 0) {
|
||||
glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ONE);
|
||||
}
|
||||
else if ((state & DRW_STATE_BLEND_PREMUL) != 0) {
|
||||
else if ((state & DRW_STATE_BLEND_ALPHA_PREMUL) != 0) {
|
||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
else if ((state & DRW_STATE_MULTIPLY) != 0) {
|
||||
else if ((state & DRW_STATE_BLEND_MUL) != 0) {
|
||||
glBlendFunc(GL_DST_COLOR, GL_ZERO);
|
||||
}
|
||||
else if ((state & DRW_STATE_BLEND_OIT) != 0) {
|
||||
@@ -211,14 +212,14 @@ void drw_state_set(DRWState state)
|
||||
GL_ZERO,
|
||||
GL_ONE_MINUS_SRC_ALPHA); /* Alpha */
|
||||
}
|
||||
else if ((state & DRW_STATE_ADDITIVE) != 0) {
|
||||
else if ((state & DRW_STATE_BLEND_ADD) != 0) {
|
||||
/* Do not let alpha accumulate but premult the source RGB by it. */
|
||||
glBlendFuncSeparate(GL_SRC_ALPHA,
|
||||
GL_ONE, /* RGB */
|
||||
GL_ZERO,
|
||||
GL_ONE); /* Alpha */
|
||||
}
|
||||
else if ((state & DRW_STATE_ADDITIVE_FULL) != 0) {
|
||||
else if ((state & DRW_STATE_BLEND_ADD_FULL) != 0) {
|
||||
/* Let alpha accumulate. */
|
||||
glBlendFunc(GL_ONE, GL_ONE);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ static void EDIT_ARMATURE_cache_init(void *vedata)
|
||||
/* Solid bones */
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CULL_BACK;
|
||||
psl->bone_solid[i] = DRW_pass_create("Bone Solid Pass", state | DRW_STATE_WRITE_DEPTH);
|
||||
psl->bone_transp[i] = DRW_pass_create("Bone Transp Pass", state | DRW_STATE_BLEND);
|
||||
psl->bone_transp[i] = DRW_pass_create("Bone Transp Pass", state | DRW_STATE_BLEND_ALPHA);
|
||||
|
||||
/* Bones Outline */
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL;
|
||||
@@ -86,21 +86,21 @@ static void EDIT_ARMATURE_cache_init(void *vedata)
|
||||
|
||||
/* Wire bones */
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_BLEND;
|
||||
DRW_STATE_BLEND_ALPHA;
|
||||
psl->bone_wire[i] = DRW_pass_create("Bone Wire Pass", state);
|
||||
|
||||
/* distance outline around envelope bones */
|
||||
state = DRW_STATE_ADDITIVE | DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
state = DRW_STATE_BLEND_ADD | DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_CULL_FRONT;
|
||||
psl->bone_envelope[i] = DRW_pass_create("Bone Envelope Outline Pass", state);
|
||||
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_BLEND;
|
||||
DRW_STATE_BLEND_ALPHA;
|
||||
psl->relationship[i] = DRW_pass_create("Bone Relationship Pass", state);
|
||||
}
|
||||
|
||||
{
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WIRE_SMOOTH | DRW_STATE_BLEND;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WIRE_SMOOTH | DRW_STATE_BLEND_ALPHA;
|
||||
psl->bone_axes = DRW_pass_create("Bone Axes Pass", state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ static void EDIT_CURVE_cache_init(void *vedata)
|
||||
&stl->g_data->wire_normals_shgrp_xray);
|
||||
|
||||
psl->overlay_edge_pass = DRW_pass_create("Curve Handle Overlay",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND);
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA);
|
||||
|
||||
grp = DRW_shgroup_create(sh_data->overlay_edge_sh, psl->overlay_edge_pass);
|
||||
DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo);
|
||||
|
||||
@@ -398,7 +398,7 @@ static void edit_mesh_create_overlay_passes(float face_alpha,
|
||||
|
||||
/* Verts */
|
||||
passes->verts = DRW_pass_create("Edit Mesh Verts",
|
||||
(DRW_STATE_WRITE_COLOR | statemod) & ~DRW_STATE_BLEND);
|
||||
(DRW_STATE_WRITE_COLOR | statemod) & ~DRW_STATE_BLEND_ALPHA);
|
||||
if (select_vert) {
|
||||
grp = shgrps->verts = DRW_shgroup_create(vert_sh, passes->verts);
|
||||
DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo);
|
||||
@@ -547,7 +547,7 @@ static void EDIT_MESH_cache_init(void *vedata)
|
||||
|
||||
{
|
||||
/* Mesh Analysis Pass */
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA;
|
||||
psl->mesh_analysis_pass = DRW_pass_create("Mesh Analysis", state);
|
||||
const bool is_vertex_color = scene->toolsettings->statvis.type == SCE_STATVIS_SHARP;
|
||||
g_data->mesh_analysis_shgrp = DRW_shgroup_create(
|
||||
@@ -561,7 +561,7 @@ static void EDIT_MESH_cache_init(void *vedata)
|
||||
edit_mesh_create_overlay_passes(face_mod,
|
||||
g_data->data_mask,
|
||||
g_data->do_edges,
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND,
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA,
|
||||
&psl->edit_passes_in_front,
|
||||
&g_data->edit_in_front_shgrps);
|
||||
|
||||
@@ -569,7 +569,7 @@ static void EDIT_MESH_cache_init(void *vedata)
|
||||
edit_mesh_create_overlay_passes(face_mod,
|
||||
g_data->data_mask,
|
||||
g_data->do_edges,
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND,
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA,
|
||||
&psl->edit_passes,
|
||||
&g_data->edit_shgrps);
|
||||
}
|
||||
@@ -583,7 +583,7 @@ static void EDIT_MESH_cache_init(void *vedata)
|
||||
&psl->edit_passes,
|
||||
&g_data->edit_shgrps);
|
||||
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA;
|
||||
psl->facefill_occlude = DRW_pass_create("Front Face Color", state);
|
||||
psl->facefill_occlude_cage = DRW_pass_create("Front Face Cage Color", state);
|
||||
|
||||
@@ -616,7 +616,7 @@ static void EDIT_MESH_cache_init(void *vedata)
|
||||
struct GPUBatch *quad = DRW_cache_fullscreen_quad_get();
|
||||
|
||||
psl->mix_occlude = DRW_pass_create("Mix Occluded Wires",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND);
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA);
|
||||
DRWShadingGroup *mix_shgrp = DRW_shgroup_create(sh_data->overlay_mix, psl->mix_occlude);
|
||||
DRW_shgroup_call(mix_shgrp, quad, NULL);
|
||||
DRW_shgroup_uniform_float_copy(mix_shgrp, "alpha", backwire_opacity);
|
||||
|
||||
@@ -109,7 +109,7 @@ static void EDIT_METABALL_cache_init(void *vedata)
|
||||
{
|
||||
/* Create a pass */
|
||||
DRWState state = (DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_BLEND);
|
||||
DRW_STATE_BLEND_ALPHA);
|
||||
psl->pass = DRW_pass_create("My Pass", state);
|
||||
|
||||
/* Create a shadingGroup using a function in draw_common.c or custom one */
|
||||
|
||||
@@ -1165,7 +1165,7 @@ static void OBJECT_cache_init(void *vedata)
|
||||
}
|
||||
|
||||
{
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA;
|
||||
psl->outlines_resolve = DRW_pass_create("Outlines Resolve Pass", state);
|
||||
|
||||
struct GPUBatch *quad = DRW_cache_fullscreen_quad_get();
|
||||
@@ -1180,7 +1180,7 @@ static void OBJECT_cache_init(void *vedata)
|
||||
|
||||
{
|
||||
/* Grid pass */
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA;
|
||||
psl->grid = DRW_pass_create("Infinite Grid Pass", state);
|
||||
|
||||
struct GPUBatch *geom = DRW_cache_grid_get();
|
||||
@@ -1225,11 +1225,11 @@ static void OBJECT_cache_init(void *vedata)
|
||||
|
||||
/* Wire bones */
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_BLEND;
|
||||
DRW_STATE_BLEND_ALPHA;
|
||||
sgl->bone_wire = psl->bone_wire[i] = DRW_pass_create("Bone Wire Pass", state);
|
||||
|
||||
/* distance outline around envelope bones */
|
||||
state = DRW_STATE_ADDITIVE | DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
state = DRW_STATE_BLEND_ADD | DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_CULL_FRONT;
|
||||
sgl->bone_envelope = psl->bone_envelope[i] = DRW_pass_create("Bone Envelope Outline Pass",
|
||||
state);
|
||||
@@ -1246,10 +1246,10 @@ static void OBJECT_cache_init(void *vedata)
|
||||
struct GPUShader *sh;
|
||||
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_BLEND;
|
||||
DRW_STATE_BLEND_ALPHA;
|
||||
sgl->non_meshes = psl->non_meshes[i] = DRW_pass_create("Non Meshes Pass", state);
|
||||
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND;
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA;
|
||||
sgl->image_empties = psl->image_empties[i] = DRW_pass_create("Image Empties", state);
|
||||
|
||||
/* Empties */
|
||||
@@ -1382,12 +1382,12 @@ static void OBJECT_cache_init(void *vedata)
|
||||
sgl->points_dupli = shgroup_points(sgl->non_meshes, gb->colorDupli, sh, draw_ctx->sh_cfg);
|
||||
sgl->points_dupli_select = shgroup_points(
|
||||
sgl->non_meshes, gb->colorDupliSelect, sh, draw_ctx->sh_cfg);
|
||||
DRW_shgroup_state_disable(sgl->points, DRW_STATE_BLEND);
|
||||
DRW_shgroup_state_disable(sgl->points_select, DRW_STATE_BLEND);
|
||||
DRW_shgroup_state_disable(sgl->points_transform, DRW_STATE_BLEND);
|
||||
DRW_shgroup_state_disable(sgl->points_active, DRW_STATE_BLEND);
|
||||
DRW_shgroup_state_disable(sgl->points_dupli, DRW_STATE_BLEND);
|
||||
DRW_shgroup_state_disable(sgl->points_dupli_select, DRW_STATE_BLEND);
|
||||
DRW_shgroup_state_disable(sgl->points, DRW_STATE_BLEND_ALPHA);
|
||||
DRW_shgroup_state_disable(sgl->points_select, DRW_STATE_BLEND_ALPHA);
|
||||
DRW_shgroup_state_disable(sgl->points_transform, DRW_STATE_BLEND_ALPHA);
|
||||
DRW_shgroup_state_disable(sgl->points_active, DRW_STATE_BLEND_ALPHA);
|
||||
DRW_shgroup_state_disable(sgl->points_dupli, DRW_STATE_BLEND_ALPHA);
|
||||
DRW_shgroup_state_disable(sgl->points_dupli_select, DRW_STATE_BLEND_ALPHA);
|
||||
|
||||
/* Metaballs Handles */
|
||||
sgl->mball_handle = buffer_instance_mball_handles(sgl->non_meshes, draw_ctx->sh_cfg);
|
||||
@@ -1483,7 +1483,7 @@ static void OBJECT_cache_init(void *vedata)
|
||||
sgl->field_cone_limit = buffer_instance_scaled(sgl->non_meshes, geom, draw_ctx->sh_cfg);
|
||||
|
||||
/* Transparent Shapes */
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND |
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA |
|
||||
DRW_STATE_CULL_FRONT;
|
||||
sgl->transp_shapes = psl->transp_shapes[i] = DRW_pass_create("Transparent Shapes", state);
|
||||
|
||||
@@ -1528,7 +1528,7 @@ static void OBJECT_cache_init(void *vedata)
|
||||
DRWShadingGroup *grp;
|
||||
static float outlineWidth, size;
|
||||
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA;
|
||||
psl->ob_center = DRW_pass_create("Obj Center Pass", state);
|
||||
|
||||
outlineWidth = 1.0f * U.pixelsize;
|
||||
@@ -1574,7 +1574,7 @@ static void OBJECT_cache_init(void *vedata)
|
||||
/* Particle Pass */
|
||||
psl->particle = DRW_pass_create("Particle Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH |
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND);
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ static void overlay_cache_init(void *vedata)
|
||||
|
||||
{
|
||||
/* Face Orientation Pass */
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND_ALPHA;
|
||||
psl->face_orientation_pass = DRW_pass_create("Face Orientation", state);
|
||||
g_data->face_orientation_shgrp = DRW_shgroup_create(sh_data->face_orientation,
|
||||
psl->face_orientation_pass);
|
||||
|
||||
@@ -239,7 +239,7 @@ static void PAINT_TEXTURE_cache_init(void *vedata)
|
||||
/* Create a pass */
|
||||
{
|
||||
DRWPass *pass = DRW_pass_create(
|
||||
"Image Color Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND);
|
||||
"Image Color Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND_ALPHA);
|
||||
DRWShadingGroup *shgrp = DRW_shgroup_create(sh_data->fallback, pass);
|
||||
|
||||
/* Uniforms need a pointer to it's value so be sure it's accessible at
|
||||
@@ -316,7 +316,7 @@ static void PAINT_TEXTURE_cache_init(void *vedata)
|
||||
|
||||
{
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_BLEND;
|
||||
DRW_STATE_BLEND_ALPHA;
|
||||
DRWPass *pass = DRW_pass_create("Face Mask Pass", state);
|
||||
DRWShadingGroup *shgrp = DRW_shgroup_create(sh_data->face_select_overlay, pass);
|
||||
static float col[4] = {1.0f, 1.0f, 1.0f, 0.2f};
|
||||
|
||||
@@ -198,7 +198,7 @@ static void PAINT_VERTEX_cache_init(void *vedata)
|
||||
/* Vertex color pass */
|
||||
{
|
||||
DRWPass *pass = DRW_pass_create(
|
||||
"Vert Color Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_MULTIPLY);
|
||||
"Vert Color Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND_MUL);
|
||||
DRWShadingGroup *shgrp = DRW_shgroup_create(sh_data->by_mode[VERTEX_MODE].color_face, pass);
|
||||
DRW_shgroup_uniform_float_copy(
|
||||
shgrp, "white_factor", 1.0f - v3d->overlay.vertex_paint_mode_opacity);
|
||||
@@ -212,7 +212,7 @@ static void PAINT_VERTEX_cache_init(void *vedata)
|
||||
/* Weight color pass */
|
||||
{
|
||||
DRWPass *pass = DRW_pass_create(
|
||||
"Weight Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_MULTIPLY);
|
||||
"Weight Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND_MUL);
|
||||
DRWShadingGroup *shgrp = DRW_shgroup_create(sh_data->by_mode[WEIGHT_MODE].color_face, pass);
|
||||
DRW_shgroup_uniform_bool_copy(
|
||||
shgrp, "drawContours", (v3d->overlay.wpaint_flag & V3D_OVERLAY_WPAINT_CONTOURS) != 0);
|
||||
@@ -259,7 +259,7 @@ static void PAINT_VERTEX_cache_init(void *vedata)
|
||||
static float col[4] = {1.0f, 1.0f, 1.0f, 0.2f};
|
||||
DRWPass *pass = DRW_pass_create("Face Mask Pass",
|
||||
DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH |
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND);
|
||||
DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA);
|
||||
DRWShadingGroup *shgrp = DRW_shgroup_create(sh_data->face_select_overlay, pass);
|
||||
DRW_shgroup_uniform_vec4(shgrp, "color", col, 1);
|
||||
if (rv3d->rflag & RV3D_CLIPPING) {
|
||||
|
||||
@@ -121,7 +121,7 @@ static void POSE_cache_init(void *vedata)
|
||||
/* Solid bones */
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CULL_BACK;
|
||||
psl->bone_solid[i] = DRW_pass_create("Bone Solid Pass", state | DRW_STATE_WRITE_DEPTH);
|
||||
psl->bone_transp[i] = DRW_pass_create("Bone Transp Pass", state | DRW_STATE_BLEND);
|
||||
psl->bone_transp[i] = DRW_pass_create("Bone Transp Pass", state | DRW_STATE_BLEND_ALPHA);
|
||||
|
||||
/* Bones Outline */
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL;
|
||||
@@ -129,23 +129,23 @@ static void POSE_cache_init(void *vedata)
|
||||
|
||||
/* Wire bones */
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_BLEND;
|
||||
DRW_STATE_BLEND_ALPHA;
|
||||
psl->bone_wire[i] = DRW_pass_create("Bone Wire Pass", state);
|
||||
|
||||
/* distance outline around envelope bones */
|
||||
state = DRW_STATE_ADDITIVE | DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
state = DRW_STATE_BLEND_ADD | DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_CULL_FRONT;
|
||||
psl->bone_envelope[i] = DRW_pass_create("Bone Envelope Outline Pass", state);
|
||||
|
||||
state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL |
|
||||
DRW_STATE_BLEND;
|
||||
DRW_STATE_BLEND_ALPHA;
|
||||
psl->relationship[i] = DRW_pass_create("Bone Relationship Pass", state);
|
||||
|
||||
ppd->custom_shapes[i] = BLI_ghash_ptr_new(__func__);
|
||||
}
|
||||
|
||||
{
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WIRE_SMOOTH | DRW_STATE_BLEND;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WIRE_SMOOTH | DRW_STATE_BLEND_ALPHA;
|
||||
psl->bone_axes = DRW_pass_create("Bone Axes Pass", state);
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ static void POSE_cache_init(void *vedata)
|
||||
copy_v4_fl4(ppd->blend_color_invert, 0.0f, 0.0f, 0.0f, pow(alpha, 4));
|
||||
DRWShadingGroup *grp;
|
||||
psl->bone_selection = DRW_pass_create(
|
||||
"Bone Selection", DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND);
|
||||
"Bone Selection", DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND_ALPHA);
|
||||
grp = DRW_shgroup_create(e_data.bone_selection_sh, psl->bone_selection);
|
||||
DRW_shgroup_uniform_vec4(grp, "color", ppd->blend_color, 1);
|
||||
stl->g_data->bone_selection_shgrp = grp;
|
||||
|
||||
@@ -135,7 +135,7 @@ static void SCULPT_cache_init(void *vedata)
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
View3D *v3d = draw_ctx->v3d;
|
||||
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_MULTIPLY;
|
||||
DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND_MUL;
|
||||
psl->pass = DRW_pass_create("Sculpt Pass", state);
|
||||
|
||||
DRWShadingGroup *shgrp = DRW_shgroup_create(e_data.shader_mask, psl->pass);
|
||||
|
||||
Reference in New Issue
Block a user