Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate.cc')
-rw-r--r--source/blender/gpu/intern/gpu_immediate.cc9
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);