[Bf-blender-cvs] [2d5fe40601a] blender2.8: Eevee: Cleanup, use NULL instead of static matrix
Sergey Sharybin
noreply at git.blender.org
Wed May 9 16:43:40 CEST 2018
Commit: 2d5fe40601ad8a13f1f42300897547e3c368121b
Author: Sergey Sharybin
Date: Wed May 9 16:42:15 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB2d5fe40601ad8a13f1f42300897547e3c368121b
Eevee: Cleanup, use NULL instead of static matrix
Those are the same thing now. So no need to keep initializing matrix
over and over.
===================================================================
M source/blender/draw/engines/eevee/eevee_materials.c
===================================================================
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c
index 4d1ff243f18..19e4adaa54f 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@ -1491,9 +1491,6 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sld
DRWShadingGroup *shgrp = NULL;
Material *ma = give_current_material(ob, part->omat);
- static float mat[4][4];
- unit_m4(mat);
-
if (ma == NULL) {
ma = &defmaterial;
}
@@ -1503,13 +1500,13 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sld
float *spec_p = &ma->spec;
float *rough_p = &ma->gloss_mir;
- DRW_shgroup_call_add(stl->g_data->depth_shgrp, hair_geom, mat);
- DRW_shgroup_call_add(stl->g_data->depth_shgrp_clip, hair_geom, mat);
+ DRW_shgroup_call_add(stl->g_data->depth_shgrp, hair_geom, NULL);
+ DRW_shgroup_call_add(stl->g_data->depth_shgrp_clip, hair_geom, NULL);
shgrp = BLI_ghash_lookup(material_hash, (const void *)ma);
if (shgrp) {
- DRW_shgroup_call_add(shgrp, hair_geom, mat);
+ DRW_shgroup_call_add(shgrp, hair_geom, NULL);
}
else {
if (ma->use_nodes && ma->nodetree) {
More information about the Bf-blender-cvs
mailing list