Open ramoops opened 6 months ago
Haven't looked in details yet but linking to #6669, #6971, #3258
it kinda looks like it's half-pixel shorter, so I don't think that's the same problem that you linked
oops, accidentally closed issue as resolved
Btw your screenshot is hard to read because it is upscaled with filtering, and you are not stating in very specific terms what your problem is. It would be easier if you were more specific, as I personally have to deal with hundreds of concurrent topics and coming back to one later when the issue isn't clear makes it harder to help.
yep I'll try to take normal screenshot, the point is that the {0, 0, 0, 255} (outline) rect looks inconsistent, right line looks bigger than left. when I'm rendering horizontal rect - it's surprisingly fine
hm. strange enough, screenshot zoomed in mspaint looks absolutely normal, but on screen it looks inconsistent, so that isn't imgui issue then, sorry (there's right bar bigger than left)
That's subpixel problem, and it's out of imgui's scope.
As you can see, one pixel on your screen is actually consists of three subpixels, ordered red, green and blue. And because three subpixels are not in the same physical position inside a pixel, objects colored in pure red on your monitor is actually out of center in left by 1/3 pixel. (And black stripe on the right side is 5 subpixel in width, not 3.)
It can be compensated using subpixel rendering. With your monitor black stripe on both side of red stripe will look in same thickness, but actually right one has one black and one cyan pixel.
The problem is, it's hardware dependant. If you compensate it on one monitor, the result will look like crap when you show it on another monitor. (For example, mine has triangular subpixel, so my red is half a pixel up out of center.)
To do subpixel rendering, first you need to know what subpixel arrangement the monitor use is, That's why it's usually integrated in OS level with narrow scope of usage(like Windows ClearType text renderer), and why your issue is unsolvable in imgui's level.
Version/Branch of Dear ImGui:
1.90.4
Back-ends:
imgui_impl_dx11.cpp + imgui_impl_win32.cpp
Compiler, OS:
Win 10 + MSVC 22
Full config/build information:
Details:
My Issue/Question:
ok so, my code draws inconsistent rects as shown in screenshots it may not be very noticeable on mine screenshots, but it's very noticeable when rendering it on 1920x1080 I also tried turning off antialiasing using drawlist flags and drawing using other methods (rectfilled, other positions, sizes, etc), but nothing changed
Screenshots/Video:
Minimal, Complete and Verifiable Example code: