Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually Resizing Viewport Render makes a Flickering Godot Splashscreen Background #10227

Open
lainv0hndyrec opened this issue Aug 10, 2017 · 9 comments

Comments

@lainv0hndyrec
Copy link

Operating system or device - Godot version:
Godot 2.1.3 stable
Windows 7 service pack 1

Issue description:
i wrote a script that will resize my Base Game Display Size Pixel Perfectly to a Screen/Window Size by having a Resize Value of Integers.

in Project Settings Display

  • Game Display 144x216
  • Test Screen 500x500
  • set Stretch mode to Viewport

the main function that resize the render is the Viewport.set_render_target_to_screen_rect()

if you hit play it will display the sprite pixel perfectly resized to the given Window/fullscreen size. but there is a flickering Godot Splashscreen behind it. but my friend who uses Linux dosent have the flickering

Steps to reproduce:
Open the Project in a Windows OS and hit play.

Link to minimal example project:
http://www.mediafire.com/file/88hes1vm3cb902a/Test.rar

here is the Test Project

@bitbionic
Copy link

Windows 10, NVIDIA 1070, Godot 2.1.4

I can confirm that I'm running into flickering with manual resizing of the viewport as well. In trying to bypass this problem #11760 I wrote:

	var dpi = OS.get_screen_dpi( OS.get_current_screen() )
	var size = OS.get_screen_size( OS.get_current_screen() )
	var viewport = get_viewport()
	print( "DPI: %d, Screen Size: %s" % [dpi, str(size)] )
	print( "Orig Viewport: %s" % str(viewport.get_rect()) )
	viewport.set_rect( Rect2( Vector2(0,0), size ) )
	print( "New Viewport: %s" % str(viewport.get_rect()) )

This is to address the an issue with Windows Desktop Scaling in fullscreen, but I got the flickering. It looked like the viewport was resized but not set at x=0,y=0.. The remaining area on the screen flickers. I'm attaching a video - flickering is worse than the video portrays probably due to sampling:

flickerdemo.zip

@lainv0hndyrec
Copy link
Author

it does the same thing in Android Exports. the fix ive done is to use the Camera size and just adjust the Camera size that will fit the desired size in to the screen.

also there is a VisualServer where you can add a black bar (letter boxing) to your game that hides the flickering Godot SplashScreen

@akien-mga
Copy link
Member

Is this still reproducible in Godot 3.0 RC1?

@sszigeti
Copy link

sszigeti commented May 3, 2018

@akien-mga I see the same issue in 3.0.2 on Windows 10 as @bitbionic has reported.

Having fullscreen on with size/width and size/height smaller than my default screen displays the test scene in the top-left corner while the splash image is rendered beneath, flickering.

Changing stretch mode doesn't seem to have any effect on this. Turning off vsync/use_vsync adds some randomly teleporting horizontal black lines to the splash screen.

@witten
Copy link

witten commented Jan 28, 2019

@KoBeWi
Copy link
Member

KoBeWi commented Jun 12, 2020

Still happens in 3.2, not sure about master, because I don't know the equivalent of set_attach_to_screen_rect() in Vulkan.

Also here's up-to-date repro
Test.zip

@leogott
Copy link

leogott commented Feb 21, 2023

Observed the flickering godot splash screen in Android Editor v4.0.rc.custom_build [8c7b98d]

steps to repeat
Follow the 2D Tutorial using Godot Editor Android. I used the compatibility rendering-mode, not sure if it matters.
The issue arises when the viewport dimensions are modified from the defaults.

Please lmk if I should open a new issue for this, as the setup is very different.

@Calinou
Copy link
Member

Calinou commented Feb 21, 2023

Observed the flickering godot splash screen in Android Editor v4.0.rc.custom_build [8c7b98d]

This was resolved by #73300 in 4.0.rc3.

@YuriSizov YuriSizov modified the milestones: 4.0, 3.x Feb 22, 2023
@YuriSizov
Copy link
Contributor

I'm putting it into the 3.x milestone because things are pretty different between Godot 3 and Godot 4, so if there are issues of that kind in Godot 4, those are probably new and would be resolved separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants