diff options
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_antialiasing.c | 2 | ||||
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_shader.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_antialiasing.c b/source/blender/draw/engines/gpencil/gpencil_antialiasing.c index e81073db4a5..4dd5e3b2da1 100644 --- a/source/blender/draw/engines/gpencil/gpencil_antialiasing.c +++ b/source/blender/draw/engines/gpencil/gpencil_antialiasing.c @@ -115,6 +115,8 @@ void GPENCIL_antialiasing_init(struct GPENCIL_Data *vedata) DRW_shgroup_uniform_texture(grp, "colorTex", pd->color_tx); DRW_shgroup_uniform_texture(grp, "revealTex", pd->reveal_tx); DRW_shgroup_uniform_vec4_copy(grp, "viewportMetrics", metrics); + DRW_shgroup_uniform_float_copy( + grp, "lumaWeight", pd->scene->grease_pencil_settings.smaa_threshold); DRW_shgroup_clear_framebuffer(grp, GPU_COLOR_BIT, 0, 0, 0, 0, 0.0f, 0x0); DRW_shgroup_call_procedural_triangles(grp, NULL, 1); diff --git a/source/blender/draw/engines/gpencil/gpencil_shader.c b/source/blender/draw/engines/gpencil/gpencil_shader.c index fe095b1b916..6284e0a648c 100644 --- a/source/blender/draw/engines/gpencil/gpencil_shader.c +++ b/source/blender/draw/engines/gpencil/gpencil_shader.c @@ -135,10 +135,11 @@ GPUShader *GPENCIL_shader_antialiasing(int stage) }, .defs = (const char *[]){ + "uniform float lumaWeight;\n", "#define SMAA_GLSL_3\n", "#define SMAA_RT_METRICS viewportMetrics\n", "#define SMAA_PRESET_HIGH\n", - "#define SMAA_LUMA_WEIGHT float4(1.0, 1.0, 1.0, 0.0)\n", + "#define SMAA_LUMA_WEIGHT float4(lumaWeight, lumaWeight, lumaWeight, 0.0)\n", "#define SMAA_NO_DISCARD\n", stage_define, NULL, |