Multisampling bug?

Previous topic - Next topic

FutureCow

This bug took me ages to pin down and drove me nuts trying to find it!!!  :rant:

Create a new project, 1024x768, not fullscreen, multisampling = 4
Code (glbasic) Select

DRAWLINE 100,100,100,500, RGB(255,255,255)
SHOWSCREEN
MOUSEWAIT


If you look at the line it's drawn, instead of being perfectly straight, it gets a little pixel added to the end on the side.
Turn multisampling to 0 and it goes away.

I wouldn't have thought multisampling would only affect the end pixel, but it does. It happens regardless of whether you draw horizontal or vertical lines.

With multisampling=4, it you use a png to draw a sprite of a box, you get a perfect box, multisampling doesn't affect it. Instead if you use 4 lines to draw the same box, you get a box with pixels sticking out.

Kitty Hello

Oops. I have no idea. I'm not using multisampling at all. Try DRAWRECT instead...maybe?
I remember drawing such a pixel when you draw a line, since it's missing otherwise when you disable multisampling...

FutureCow

I'll turn multisampling off (I've got no need for it, I just thought things would automatically look better with it on), and I'll also use a png of a rectangle instead (from memory drawrect can only draw a filled rectangle and I need an empty one).

Kitty Hello

With 4 drawrect calls you can draw a frame ;)
I do this a lot in DDgui.