diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 17:11:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 17:14:03 +0300 |
commit | 73b55a5508c6f3e9bb7b59d2d903ac584518eccc (patch) | |
tree | d7fdb2fd47bf743d3a7bc6a5edfccbd25b8175dd /source/blender/draw/engines/eevee/eevee_materials.c | |
parent | 56b06ee83afba38099fb7affc260885a613a3779 (diff) |
Cleanup: style, use braces for draw
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_materials.c')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_materials.c | 52 |
1 files changed, 39 insertions, 13 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index 15b3457874d..ad49d3f8ae7 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -723,13 +723,27 @@ struct GPUMaterial *EEVEE_material_mesh_get( const void *engine = &DRW_engine_viewport_eevee_type; int options = VAR_MAT_MESH; - if (use_blend) options |= VAR_MAT_BLEND; - if (use_multiply) options |= VAR_MAT_MULT; - if (use_refract) options |= VAR_MAT_REFRACT; - if (use_sss) options |= VAR_MAT_SSS; - if (use_sss && effects->sss_separate_albedo) options |= VAR_MAT_SSSALBED; - if (use_translucency) options |= VAR_MAT_TRANSLUC; - if (((effects->enabled_effects & EFFECT_VOLUMETRIC) != 0) && use_blend) options |= VAR_MAT_VOLUME; + if (use_blend) { + options |= VAR_MAT_BLEND; + } + if (use_multiply) { + options |= VAR_MAT_MULT; + } + if (use_refract) { + options |= VAR_MAT_REFRACT; + } + if (use_sss) { + options |= VAR_MAT_SSS; + } + if (use_sss && effects->sss_separate_albedo) { + options |= VAR_MAT_SSSALBED; + } + if (use_translucency) { + options |= VAR_MAT_TRANSLUC; + } + if (((effects->enabled_effects & EFFECT_VOLUMETRIC) != 0) && use_blend) { + options |= VAR_MAT_VOLUME; + } options |= eevee_material_shadow_option(shadow_method); @@ -852,10 +866,18 @@ static struct DRWShadingGroup *EEVEE_default_shading_group_create( ssr_id = (use_ssr) ? 1 : -1; int options = VAR_MAT_MESH; - if (is_hair) options |= VAR_MAT_HAIR; - if (is_flat_normal) options |= VAR_MAT_FLAT; - if (use_blend) options |= VAR_MAT_BLEND; - if (((effects->enabled_effects & EFFECT_VOLUMETRIC) != 0) && use_blend) options |= VAR_MAT_VOLUME; + if (is_hair) { + options |= VAR_MAT_HAIR; + } + if (is_flat_normal) { + options |= VAR_MAT_FLAT; + } + if (use_blend) { + options |= VAR_MAT_BLEND; + } + if (((effects->enabled_effects & EFFECT_VOLUMETRIC) != 0) && use_blend) { + options |= VAR_MAT_VOLUME; + } options |= eevee_material_shadow_option(shadow_method); @@ -883,8 +905,12 @@ static struct DRWShadingGroup *EEVEE_default_shading_group_get( BLI_assert(!is_hair || (ob && psys && md)); - if (is_hair) options |= VAR_MAT_HAIR; - if (is_flat_normal) options |= VAR_MAT_FLAT; + if (is_hair) { + options |= VAR_MAT_HAIR; + } + if (is_flat_normal) { + options |= VAR_MAT_FLAT; + } options |= eevee_material_shadow_option(shadow_method); |