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.
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.
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.
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?
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
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.
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.