Any known fix for white screen rendering (possibly caused by laptops with integrated and dedicated graphics card?)

Hi,
For the game I’m working on, we’ve released a prototype a few months back. One of the few persistent issues that has been found is that on certain pcs it displays a white screen with background sounds and never displays an image. I unfortunately do not have a pc that reproduces this problem at present so am struggling to know exactly the cause (there’s a thread about it here https://itch.io/t/80599/game-starts-but-screen-is-white that suggests the issue is down to integrated/dedicated graphics cards on laptops but that could be coincidental). It seems that in some cases forcing the game to use the integrated graphics card fixes the issue but it doesn’t seem an ideal fix and may become more problematic when the game uses more rendering capabilities that might stretch the integrated card… (speaking of which, is there a way to try and force a particular graphics card to be used in that situation or is it down to user control in that case?). The version available online uses monogame 3.5 but I have locally upgraded to 3.6 and supplied it to someone affected and they are still encountering the problem.

I was wondering if anyone else might have encountered this problem and have a suggestion? I’ve tried my best to search through other threads and generally online but have come up blank apart from an unanswered post in 2015 (White screen after window size change) which might or might not be related…

Thanks,
Neal

My bet is Rendertarget handling / surface formats, discard/persistent content settings. I´ve run into issues with those on integrated GPUs but I have been able to clean that up. Try to simplify RTs, optimize and see how that goes, for sake of debugging remove postprocessing and so on.

Btw in my case it was stupid mistake around RT switching and discarding, it was handled well by dedicated GPUs but on integrated after several screen switches they started to blend through and so on. For instance start with finding out if some of your RT is filled with white in same cases (shadow occlusion or whatnot) and go from there.

Are you using the DirectX or the OpenGL path? Is it on Windows PCs?
Do you use rendertargets, what formats do you use? How large are your largest textures?

You could just wrap a try{ } clause around your whole program and write a .log when something unexpected happens, maybe that can help debug.

Thanks for the reply. Oddly the claims on itchio suggest it is the dedicated card causing problems so I’m confused why they would have problems with RTs given having more capabilities than the integrated! I will look to pass onto them a build that allows enabling/disabling lighting and each buildup of what is being drawn to see if that shows the point it is failing at. My current setup is something like this in quick code:

  • set render target to light rendertarget2d, clear to black, draw lighting (ambient overall color and individual light sprites)
  • set render target maintarget with camera transformation, clear to transparent, draw scene to light in its normal colors
  • set render target null, clear to blue (default background color), setup light fx shader, draw maintarget passing in light rendertarget to indicate how the two should blend together
  • draw overlaid UI
  • draw debug UI
  • end draw

Currently using DirectX path and so yes on just Windows PCs.

2 RenderTarget2D used with what seem pretty default settings and a simple shader that blends between the two in the actual drawing target (there’s an additional two targets used for blurring in certain circumstances but on starting the game these wouldn’t be drawn to so hopefully they don’t matter):
var pp = GraphicsDevice.PresentationParameters;
lightsTarget = new RenderTarget2D(
GraphicsDevice, pp.BackBufferWidth, pp.BackBufferHeight);
mainTarget = new RenderTarget2D(
GraphicsDevice, pp.BackBufferWidth, pp.BackBufferHeight);

The resolution of the game is 960x540, I do immediately switch to fullscreen (with HardwareModeSwitch disabled due to having a prior crash with that on).

Largest texture is 2048x2048 though for ingame it’s 1159x924 (I don’t entirely know how it ended up at that size!). We did previously have a texture 5000x11000 which did cause issues on some PCs but have since removed it!

In terms of crashes I have got a try around the whole program but this doesn’t seem to catch anything in this case as the game still runs, just doesn’t display anything but white! I’m not sure if you know of some flag for monogame that would cause it to throw exceptions in unexpected circumstances? Or perhaps I need to query graphics card capabilities?

When clearing to transparent make sure you are clearing to your own definition color, transparent and transparentblack in Color definition are wonky…

I’m having a similar issue but in reverse (integrated graphics works, video card does not). My monogame window is blank and white on my desktop. I have a laptop and desktop, the exe game window always works on my laptop but only 50% of the time on my desktop. I can click “start” in VS and it is a flip of coin if it will appear or not on my desktop. It is so odd. It works once than doesn’t. Here are specs.

Both

  • Windows 10
  • No shaders are running

Laptop

  • i7, integrated graphics (drivers up to date)

Desktop

  • Nvidia gt 1080 ti (drivers up to date)

I’ve played with many local settings on nvidia and how it works with VS. Nothing seems to help.

Was there a solution to this problem?

Thank,
D

That does sound odd (I think the issue is the same in terms of results in that integrated works according to those experiencing it). With the desktop does the cpu have an integrated graphics chip? Just to see if it is a similar setup in that respect…

Unfortunately I haven’t been able to get any further in coming up with a solution. I don’t have access to a computer with the issue which has made it difficult to be able to know what to try as well…

In terms of your game, are you forcing it full screen resolution on startup? Have you tried keeping it as windowed to see if that yields the same results or not?