Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/draw/engines/eevee/eevee_materials.c7
-rw-r--r--source/blender/makesdna/DNA_material_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_material.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c
index 929e0932144..0681780484d 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@ -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;
}
}
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index fc0f4df4170..c7d7ff1e5db 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -502,6 +502,7 @@ enum {
MA_BM_MULTIPLY,
MA_BM_CLIP,
MA_BM_HASHED,
+ MA_BM_BLEND,
};
#endif
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 27b9778f280..2625c9cf1f3 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -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}
};