Back to the 90's - Weird GFX bug

I tried to ignore it as we only had it on one computer in our office but now another newly bought computer has the same thing so lets search for a solution!

On 2 of our computers, when starting up our game, it looks like this: (ASCii art for the win?)

Whenever we resize the window jus the slightest, the gfx glitch is gone and it looks fine. We just don’t want to resize the window every time we start the game. Also, Defold team might be interested in the bug as well.

Specs1: https://www.webhallen.com/se/product/274870-ASUS-ZenBook-UX430UN-PURE6X-14-FHD-i7-8550U-16GB-512GB-SSD-M-2-MX150-Win-10

Specs2: Asus UX430UNR, i7-8550U, NVIDIA GeForce MX150, 16 GB RAM

4 Likes

Do you get the artefacts for an empty project as well? (ie no native extensions etc)

Had EXACTLY the same problem with Dell notebooks using the Dell supplied Intel gfx driver.

The intel driver would not install until the Dell driver was manually uninstalled because the intel installer will redirect you to install manufacturers drivers.

The dual gfx laptops you have will probably have an old intel driver installed and won’t use the NVIDIA gfx unless specifically told to do so on an app by app basis so Defold could be using the integrated intel gfx with old drivers.

I think it’s something related to DEF-2695

Thank you for your answers. This is not in any way a critical matter (and as we DO have stuff that are critical) I just threw out this one for now and we can pick it up later on when we have more time to investigate.

4 Likes

This was reported on Slack as well. @andreas.strangequest is it still happening for you? Under what circumstances? On specific hardware?


One of players reported this, Win10 + 1080 GTX.

1 Like

@andreas.strangequest and @Ivan_Lytkin: Can you reproduce this locally? @andreas.strangequest, judging from your post it seems like its happening on a machine you have access to?

What kind of extensions do you have? What kind of render script? Andreas mentioned the problem going away on screen resize. Is it the same for you Ivan?

1 Like

I can’t reproduce as it’s just a player who reported this issue. I’m trying to contact him to get more details. Extensions - nothing special, defos, steamworks and

Render script is pretty basic (it happens immediately at start, so it just renders menu), but I’ creating 4 render targets at init. But they are used later.

 local function create_render_targets(self)
    if self.characters_target_1 then
        render.delete_render_target(self.characters_target_1)
    end
    if self.characters_target_2 then
        render.delete_render_target(self.characters_target_2)
    end
    if self.outline_target_1 then
        render.delete_render_target(self.outline_target_1)
    end
    if self.outline_target_2 then
        render.delete_render_target(self.outline_target_2)
    end

    if self.npot then
        self.tex_width = SCREEN_WIDTH
        self.tex_height = SCREEN_HEIGHT
    else
        self.tex_width = next_pot(SCREEN_WIDTH)
        self.tex_height = next_pot(SCREEN_HEIGHT)
    end
   
    if (self.tex_width > self.max_texture_size) or (self.tex_height > self.max_texture_size) then
        return
    end
    
    local color_params = 
    { 
        format = render.FORMAT_RGBA,
        width = self.tex_width,
        height = self.tex_height,
        min_filter = render.FILTER_NEAREST,
        mag_filter = render.FILTER_NEAREST,
        u_wrap = render.WRAP_CLAMP_TO_EDGE,
        v_wrap = render.WRAP_CLAMP_TO_EDGE 
    }

    local color_params_blur = 
    { 
        format = render.FORMAT_RGBA,
        width = self.tex_width / 2,
        height = self.tex_height / 2,
        min_filter = render.FILTER_LINEAR,
        mag_filter = render.FILTER_LINEAR,
        u_wrap = render.WRAP_CLAMP_TO_EDGE,
        v_wrap = render.WRAP_CLAMP_TO_EDGE 
    }

    --TODO pcall
    self.characters_target_1 = render.render_target("chars", {[render.BUFFER_COLOR_BIT] = color_params })
    self.characters_target_2 = render.render_target("chars2", {[render.BUFFER_COLOR_BIT] = color_params })
    self.outline_target_1 = render.render_target("outline1", {[render.BUFFER_COLOR_BIT] = color_params_blur })
    self.outline_target_2 = render.render_target("outline2", {[render.BUFFER_COLOR_BIT] = color_params_blur })
end

Yes it’s 100% reproducable on 2 of our windows desktops. Dont remember who at Defold I sent the info to (slack history is gone).
One machine is:
Asus UX430UNR
i7-8550U
NVIDIA GeForce MX150
16 GB RAM

The other one is an Asus as well.

If you have the time could you please try and switch to the default render script and see if the problem persists?

Also, besides the screen recorder, do you have any native extensions that could be messing with graphics contexts or similar?

Yes it persist with default render script. A collegue of mine started to investigate further on this but is unfortunately sick today. I will see what she came up with when she is back. Personally I believe it could have to do with big atlases. Just removing a special collection containing only sprites did the whole thing.

1 Like

@andreas.strangequest How big are your atlases? I use 2048 max.

Even though your system has an nVidia card, your CPU has Intel integrated graphics and Defold will use these unless you tell your PC to do otherwise. (Also mention in AGulev’s link above).

I 've had this on two laptops now. This is driver related (Specifically Intel). You have two options. Update from the old generic Windows 10 supplied Intel driver which exhibits this problem on newer Intel integrated graphics, or use your switchable graphics control panel (whatever this is, apologies I don’t know with nVidia dual graphics) to tell Windows to use your nVidia card for Defold instead of Intel.

Here’s a link to the latest Intel driver: https://downloadcenter.intel.com/download/28566/Intel-Graphics-Driver-for-Windows-10?product=122589

You should uninstall any Intel display drivers in Add/Remove programs prior to installing this.

1 Like