Fix 110976: Sequencer Scope Artifacts on NVIDIA 30/40 Series
This PR fixes an issue with the NVIDIA 3000/4000 series cards. The cause might be that when blending is turned off and the fragment output has an alpha of 0.0 the fragment might be discarded. This is a guess of course. By setting the Alpha to 1.0 for scopes and enabling alpha blending when drawing the meta data text seems to fix the issue. Fixes #110976 Pull Request: https://projects.blender.org/blender/blender/pulls/112665
This commit is contained in:
@@ -197,6 +197,7 @@ static ImBuf *sequencer_make_scope(Scene *scene, ImBuf *ibuf, ImBuf *(*make_scop
|
|||||||
display_ibuf, &scene->view_settings, &scene->display_settings);
|
display_ibuf, &scene->view_settings, &scene->display_settings);
|
||||||
|
|
||||||
scope = make_scope_fn(display_ibuf);
|
scope = make_scope_fn(display_ibuf);
|
||||||
|
IMB_rectfill_alpha(scope, 1.0f);
|
||||||
|
|
||||||
IMB_freeImBuf(display_ibuf);
|
IMB_freeImBuf(display_ibuf);
|
||||||
|
|
||||||
|
|||||||
@@ -869,6 +869,7 @@ void ED_region_image_metadata_draw(
|
|||||||
GPUVertFormat *format = immVertexFormat();
|
GPUVertFormat *format = immVertexFormat();
|
||||||
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
||||||
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
|
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
|
||||||
|
GPU_blend(GPU_BLEND_ALPHA);
|
||||||
immUniformThemeColor(TH_METADATA_BG);
|
immUniformThemeColor(TH_METADATA_BG);
|
||||||
immRectf(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
|
immRectf(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
|
||||||
immUnbindProgram();
|
immUnbindProgram();
|
||||||
@@ -880,6 +881,7 @@ void ED_region_image_metadata_draw(
|
|||||||
metadata_draw_imbuf(ibuf, &rect, blf_mono_font, true);
|
metadata_draw_imbuf(ibuf, &rect, blf_mono_font, true);
|
||||||
|
|
||||||
BLF_disable(blf_mono_font, BLF_CLIPPING);
|
BLF_disable(blf_mono_font, BLF_CLIPPING);
|
||||||
|
GPU_blend(GPU_BLEND_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *** lower box*** */
|
/* *** lower box*** */
|
||||||
@@ -894,6 +896,7 @@ void ED_region_image_metadata_draw(
|
|||||||
GPUVertFormat *format = immVertexFormat();
|
GPUVertFormat *format = immVertexFormat();
|
||||||
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
||||||
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
|
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
|
||||||
|
GPU_blend(GPU_BLEND_ALPHA);
|
||||||
immUniformThemeColor(TH_METADATA_BG);
|
immUniformThemeColor(TH_METADATA_BG);
|
||||||
immRectf(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
|
immRectf(pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
|
||||||
immUnbindProgram();
|
immUnbindProgram();
|
||||||
@@ -905,6 +908,7 @@ void ED_region_image_metadata_draw(
|
|||||||
metadata_draw_imbuf(ibuf, &rect, blf_mono_font, false);
|
metadata_draw_imbuf(ibuf, &rect, blf_mono_font, false);
|
||||||
|
|
||||||
BLF_disable(blf_mono_font, BLF_CLIPPING);
|
BLF_disable(blf_mono_font, BLF_CLIPPING);
|
||||||
|
GPU_blend(GPU_BLEND_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
GPU_matrix_pop();
|
GPU_matrix_pop();
|
||||||
|
|||||||
Reference in New Issue
Block a user