diff options
Diffstat (limited to 'source/blender/draw')
4 files changed, 13 insertions, 17 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_effect_aa.c b/source/blender/draw/engines/workbench/workbench_effect_aa.c index 95a81649522..f1d5d5d6078 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_aa.c +++ b/source/blender/draw/engines/workbench/workbench_effect_aa.c @@ -67,8 +67,7 @@ void workbench_aa_draw_pass(WORKBENCH_Data *vedata, GPUTexture *tx) * the workbench_taa_draw_screen_end will fill the history buffer * for the other iterations. */ - if (effect_info->jitter_index == 1) - { + if (effect_info->jitter_index == 1) { GPU_framebuffer_bind(dfbl->color_only_fb); DRW_transform_to_display(tx); } diff --git a/source/blender/draw/engines/workbench/workbench_effect_taa.c b/source/blender/draw/engines/workbench/workbench_effect_taa.c index 302cb27cbb9..fbeccc19660 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_taa.c +++ b/source/blender/draw/engines/workbench/workbench_effect_taa.c @@ -105,8 +105,7 @@ int workbench_taa_calculate_num_iterations(WORKBENCH_Data *vedata) { result = 16; } - else - { + else { result = 32; } } @@ -288,11 +287,9 @@ void workbench_taa_draw_scene_end(WORKBENCH_Data *vedata) void workbench_taa_view_updated(WORKBENCH_Data *vedata) { WORKBENCH_StorageList *stl = vedata->stl; - if (stl) - { + if (stl) { WORKBENCH_EffectInfo *effect_info = stl->effects; - if (effect_info) - { + if (effect_info) { effect_info->view_updated = true; } } diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index 76172443c2d..24ba3aa8981 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -176,14 +176,15 @@ static WORKBENCH_MaterialData *get_or_create_material_data( material->shgrp = grp; /* Depth */ - if (workbench_material_determine_color_type(wpd, material->ima) == V3D_SHADING_TEXTURE_COLOR) - { - material->shgrp_object_outline = DRW_shgroup_create(e_data.object_outline_texture_sh, psl->object_outline_pass); + if (workbench_material_determine_color_type(wpd, material->ima) == V3D_SHADING_TEXTURE_COLOR) { + material->shgrp_object_outline = DRW_shgroup_create( + e_data.object_outline_texture_sh, psl->object_outline_pass); GPUTexture *tex = GPU_texture_from_blender(material->ima, NULL, GL_TEXTURE_2D, false, 0.0f); DRW_shgroup_uniform_texture(material->shgrp_object_outline, "image", tex); } else { - material->shgrp_object_outline = DRW_shgroup_create(e_data.object_outline_sh, psl->object_outline_pass); + material->shgrp_object_outline = DRW_shgroup_create( + e_data.object_outline_sh, psl->object_outline_pass); } material->object_id = engine_object_data->object_id; DRW_shgroup_uniform_int(material->shgrp_object_outline, "object_id", &material->object_id, 1); diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c index 6755bf82ecd..54e8aa1c3b3 100644 --- a/source/blender/draw/engines/workbench/workbench_materials.c +++ b/source/blender/draw/engines/workbench/workbench_materials.c @@ -129,8 +129,7 @@ uint workbench_material_get_hash(WORKBENCH_MaterialData *material_template) result += BLI_ghashutil_uinthash_v4_murmur(input); /* add texture reference */ - if (material_template->ima) - { + if (material_template->ima) { result += BLI_ghashutil_inthash_p_murmur(material_template->ima); } @@ -182,10 +181,10 @@ int workbench_material_determine_color_type(WORKBENCH_PrivateData *wpd, Image *i return color_type; } -void workbench_material_shgroup_uniform(WORKBENCH_PrivateData *wpd, DRWShadingGroup *grp, WORKBENCH_MaterialData *material) +void workbench_material_shgroup_uniform( + WORKBENCH_PrivateData *wpd, DRWShadingGroup *grp, WORKBENCH_MaterialData *material) { - if (workbench_material_determine_color_type(wpd, material->ima) == V3D_SHADING_TEXTURE_COLOR) - { + if (workbench_material_determine_color_type(wpd, material->ima) == V3D_SHADING_TEXTURE_COLOR) { GPUTexture *tex = GPU_texture_from_blender(material->ima, NULL, GL_TEXTURE_2D, false, 0.0f); DRW_shgroup_uniform_texture(grp, "image", tex); } |