Mysterious Artifacts when using a lot of GUIs

I am not sure if this is a Roblox bug or not. It seems that if you create frame guis that are the size of a pixel some tend to be missing.

on the left is the Roblox version and on the right is the c++ version (.tga img glfw opengl ndc texture for viewer)

these are the exact obj model, the code is pretty much the same for both of them except one is written in Lua and one is written in c++ but they all follow the same pseudo code if you will. this could probably be an error on my end, maybe floating point errors (c++ one is based on an all int based model) but I am using math.round() to combat that and my bresenham one (this isn’t scanline) shows some of these artifacts too

1 Like

Roblox Studio tend to press pixels together because of the Explorer and ToolBox, maybe try closing them

I tested it in game and it showed the same thing. To add on, i scaled it up and it showed the same behaviour

Last thing I could imagine was your script skipping pixels because of errors, but highly doubt it

I’m unsure if this is related, but when I was trying to triangulate with GUI a while ago, there were also some noticeable artifacts:


Again though, it might not be related.

The way I generate the triangles is different. Instead it gets a bounding box by doing min max checks like you would with region3 then i just use this algorithm i got from stack overflow algorithm - How to determine if a point is in a 2D triangle? - Stack Overflow

Have you tried using borders for pixels instead of the actual frames? Maybe it would work.

Doing that leads to you not being able to see nothing at all as the border pixel is on the perimeter of the gui so they just like overlap and you get no detail

You could try to multiply the position script then

I’m confused what do you mean by multiply the position script?

sepperate the pixels by 0.01 (If 1 pixel was 1,1,1,1 it would be 1.01, etc, etc, etc)

The pixels are already seperated by that tiny fraction and it varies depending on the dimensions. UIGridLayout does all that for me

Weird, have you ever wondered if it was GridLayout giving up?

I know for sure it isnt grid layout, it has worked for me in the past

Oh nice, maybe try look at the script then, since GridLayout works.

The problem was i was rounding the data before the math operation, should have been other way around