[Bf-blender-cvs] [38d0e417f48] greasepencil-refactor: GPencil: Remove temp color conversion to Linear
Antonio Vazquez
noreply at git.blender.org
Fri Dec 20 10:43:38 CET 2019
Commit: 38d0e417f48797265735dc7bfc95c8e330be5633
Author: Antonio Vazquez
Date: Fri Dec 20 10:43:15 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB38d0e417f48797265735dc7bfc95c8e330be5633
GPencil: Remove temp color conversion to Linear
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
M source/blender/draw/engines/gpencil/gpencil_draw_data.c
M source/blender/draw/engines/gpencil/gpencil_engine.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index 751e9c12ebc..fbf2beb809e 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -115,7 +115,7 @@ static void gpencil_buffer_add_point(
gpStrokeVert *vert = &verts[v];
copy_v3_v3(vert->pos, &pt->x);
copy_v2_v2(vert->uv, pt->uv_fill);
- srgb_to_linearrgb_v4(vert->col, pt->mix_color);
+ copy_v4_v4(vert->col, pt->mix_color);
vert->strength = pt->strength;
vert->u_stroke = pt->uv_fac;
vert->stroke_id = gps->runtime.stroke_start;
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_data.c b/source/blender/draw/engines/gpencil/gpencil_draw_data.c
index 30eb575e438..e4d45d7ad21 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_data.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_data.c
@@ -194,10 +194,6 @@ GPENCIL_MaterialPool *gpencil_material_pool_create(GPENCIL_PrivateData *pd, Obje
copy_v4_v4(mat_data->fill_color, gp_style->fill_rgba);
mat_data->fill_texture_mix = 0.0f;
}
-
- /* TODO fix the color in the dna instead */
- srgb_to_linearrgb_v4(mat_data->fill_color, mat_data->fill_color);
- srgb_to_linearrgb_v4(mat_data->stroke_color, mat_data->stroke_color);
}
*ofs = 0;
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 145fc65406e..5c29ba085a9 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -885,10 +885,6 @@ static void gp_layer_cache_populate(bGPDlayer *gpl,
iter->ubo_lights = (use_lights) ? iter->pd->global_light_pool->ubo :
iter->pd->shadeless_light_pool->ubo;
- /* TODO fix the color in the dna instead */
- float tint_col[4];
- srgb_to_linearrgb_v4(tint_col, gpl->tintcolor);
-
struct GPUShader *sh = GPENCIL_shader_geometry_get(&en_data);
iter->grp = DRW_shgroup_create(sh, tgp_layer->geom_ps);
DRW_shgroup_uniform_block(iter->grp, "gpLightBlock", iter->ubo_lights);
@@ -907,7 +903,7 @@ static void gp_layer_cache_populate(bGPDlayer *gpl,
DRW_shgroup_uniform_float_copy(iter->grp, "thicknessOffset", (float)gpl->line_change);
DRW_shgroup_uniform_float_copy(iter->grp, "thicknessWorldScale", thickness_scale);
DRW_shgroup_uniform_float_copy(iter->grp, "vertexColorOpacity", gpl->vertex_paint_opacity);
- DRW_shgroup_uniform_vec4_copy(iter->grp, "layerTint", tint_col);
+ DRW_shgroup_uniform_vec4_copy(iter->grp, "layerTint", gpl->tintcolor);
DRW_shgroup_stencil_mask(iter->grp, 0xFF);
}
More information about the Bf-blender-cvs
mailing list