Add anti aliasing to transform constraints #107394

Merged
1 changed files with 8 additions and 1 deletions

View File

@ -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];

Remove the commented line.

Remove the commented line.
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);