Gizmo: Add anti aliasing to transform constraints
Transform constraints were being drawn on screen without anti-aliasing, now fixed to make them look smoother. See #107038 Adding a comparison of before and after the change Pull Request: https://projects.blender.org/blender/blender/pulls/107394
This commit is contained in:
committed by
Clément Foucault
parent
3298c61d1f
commit
adb63a5102
@@ -778,7 +778,14 @@ static void drawLine(
|
||||
|
||||
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
|
||||
|
||||
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
|
||||
float viewport[4];
|
||||
GPU_viewport_size_get_f(viewport);
|
||||
GPU_blend(GPU_BLEND_ALPHA);
|
||||
|
||||
immBindBuiltinProgram(GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR);
|
||||
immUniform2fv("viewportSize", &viewport[2]);
|
||||
immUniform1f("lineWidth", U.pixelsize * 2.0f);
|
||||
|
||||
immUniformColor3ubv(col2);
|
||||
|
||||
immBegin(GPU_PRIM_LINES, 2);
|
||||
|
||||
Reference in New Issue
Block a user