diff options
author | Richard Antalik <richardantalik@gmail.com> | 2020-11-17 06:10:51 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2020-11-17 06:10:51 +0300 |
commit | 797dfa6a0a7d5d2bf62bdc03cf619addbc9e1064 (patch) | |
tree | 5a1e0f0a6b2439ceee4a8e0bae82b243e3831156 /source/blender/gpu/intern | |
parent | 09045ff64d1f0948489354bd097f2930f45bacb9 (diff) | |
parent | 75bd286813eb5e3c227696b4cfd5616b17166641 (diff) |
Merge branch 'blender-v2.91-release'
Conflicts:
source/blender/editors/render/render_opengl.c
source/blender/sequencer/intern/effects.c
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_immediate.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate.cc b/source/blender/gpu/intern/gpu_immediate.cc index 110774640f1..95718391165 100644 --- a/source/blender/gpu/intern/gpu_immediate.cc +++ b/source/blender/gpu/intern/gpu_immediate.cc @@ -180,6 +180,11 @@ static void wide_line_workaround_start(GPUPrimType prim_type) immUniform2fv("viewportSize", &viewport[2]); immUniform1f("lineWidth", line_width); + if (GPU_blend_get() == GPU_BLEND_NONE) { + /* Disable line smoothing when blending is disabled (see T81827). */ + immUniform1i("lineSmooth", 0); + } + if (ELEM(polyline_sh, GPU_SHADER_3D_POLYLINE_CLIPPED_UNIFORM_COLOR, GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR)) { @@ -190,6 +195,10 @@ static void wide_line_workaround_start(GPUPrimType prim_type) static void wide_line_workaround_end() { if (imm->prev_shader) { + if (GPU_blend_get() == GPU_BLEND_NONE) { + /* Restore default. */ + immUniform1i("lineSmooth", 1); + } immUnbindProgram(); immBindShader(imm->prev_shader); |