Eevee: Transparency: Add Alpha Blend mode.
This commit is contained in:
parent
d6b46f9ea5
commit
ad7458d00c
|
@ -876,6 +876,9 @@ static void material_transparent(
|
|||
case MA_BM_MULTIPLY:
|
||||
cur_state |= DRW_STATE_MULTIPLY;
|
||||
break;
|
||||
case MA_BM_BLEND:
|
||||
cur_state |= DRW_STATE_BLEND;
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
|
@ -940,9 +943,13 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_SceneLayerData *sl
|
|||
break;
|
||||
case MA_BM_ADD:
|
||||
case MA_BM_MULTIPLY:
|
||||
case MA_BM_BLEND:
|
||||
material_transparent(ma, sldata, vedata, do_cull, use_flat_nor,
|
||||
&gpumat_array[i], &shgrp_array[i]);
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -502,6 +502,7 @@ enum {
|
|||
MA_BM_MULTIPLY,
|
||||
MA_BM_CLIP,
|
||||
MA_BM_HASHED,
|
||||
MA_BM_BLEND,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1811,6 +1811,7 @@ void RNA_def_material(BlenderRNA *brna)
|
|||
{MA_BM_MULTIPLY, "MULTIPLY", 0, "Multiply", "Render surface and blend the result with multiplicative blending"},
|
||||
{MA_BM_CLIP, "CLIP", 0, "Alpha Clip", "Use the alpha threshold to clip the visibility (binary visibility)"},
|
||||
{MA_BM_HASHED, "HASHED", 0, "Alpha Hashed", "Use noise to dither the binary visibility (works well with multi-samples)"},
|
||||
{MA_BM_BLEND, "BLEND", 0, "Alpha Blend", "Render polygon transparent, depending on alpha channel of the texture"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue