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

[4.4.dev3] Forward+ Vertex Lighting clipping on the bottom of viewport/camera/screen for some resolutions #98440

Open
Momonyaro opened this issue Oct 22, 2024 · 7 comments

Comments

@Momonyaro
Copy link

Tested versions

  • reproducable in v4.4.dev3.official [f4af820]

System information

Linux (Zorin OS) - Godot v4.4.dev3.official [f4af820] - Vulkan (Forward+)

Issue description

When trying the new vertex lighting I noticed an issue with the light clipping along the bottom of my screen.
I have been trying to find out the cause and the only real noticable factor is that if I set the resolution of the game to match the project settings viewport width/height, the clipping dissapears.

Here is a quick video I took, showing the "clipping" that I'm seeing: https://youtu.be/lCEZt4iT70U

Of course I'm also expecting that maybe it's unique to linux but I'm hoping that it's not a significant factor 🤞

Steps to reproduce

Below are the specific lines that I use to change the resolution within my settings menu.
To reproduce, set the project viewport size to something like "1920x1080" and then use the lines below to set it to something else like "2560x1440" or "1280x720"

get_window().set_size(OPTION_LIST_[currentValue])
get_viewport().set_size(OPTION_LIST_[currentValue])

Hope this helps, I am of course here for further assistance.

Minimal reproduction project (MRP)

Here is a small test project I threw together: https://github.com/Momonyaro/vertex-lit-issue
There was another issue on my end with the settings menu, making it a bit flakey but it should help show the effect when you play around with the fullscreen/resolution toggle

@Momonyaro
Copy link
Author

Should perhaps mention that I was notified that there was another mention of this issue in a pull request #83360 (review)

@clayjohn
Copy link
Member

I can't reproduce the issue with Godot v4.3.stable - Pop!_OS 22.04 LTS - X11 - Vulkan (Forward+) - integrated Intel(R) Xe Graphics (TGL GT2) - 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 Threads)

Are there any other steps to reproduce with the MRP other than switching to windowed and toggling between resolution settings?

Should perhaps mention that I was notified that there was another mention of this issue in a pull request #83360 (review)

That issue was caught and fixed before the PR was merged. I suspect that you are running into something slightly different

@Momonyaro
Copy link
Author

Hmm, not that i noticed? Its quite late here so ill investigate a bit more tomorrow and send an update

@Momonyaro
Copy link
Author

Momonyaro commented Oct 23, 2024

Update: I tried the example project that I provided on my Macbook Pro 2019 at work and while the effect doesn't appear while windowed at any of the example resolutions, it happens while fullscreened. (NOTE: The fullscreen resolution is 2560x1440 on both window and viewport size)

Macbook specs:

Processor: 2,6 GHz 6-Core Intel Core i7
Graphics: AMD Radeon Pro 5300M 4GB & Intel UHD Graphics 630 1536 MB
Memory: 32 GB 2667 MHz DDR4
MacOS: 14.1.1

Will provide better specs and have a few ideas to try out on my linux pc that I reported the issue on and will provide a better report later today.

@Momonyaro
Copy link
Author

Update:

I added more options to the example project and for me the specific resolutions that have the problem is:

  • 2560x1440 (windowed, fullscreen)
  • 1366x768 (only windowed tested)
  • 1280x1024 (only windowed tested)
  • 1280x768 (only windowed tested)
  • 1024x768 (only windowed tested)

The rest seem fine. I also no longer believe that the project width/height is a cause because I've changed it around and it doesn't seem to change what resolutions are affected. I think it's interesting that so many x768 resolutions have the issue.

@Momonyaro
Copy link
Author

I can't reproduce the issue with Godot v4.3.stable - Pop!_OS 22.04 LTS - X11 - Vulkan (Forward+) - integrated Intel(R) Xe Graphics (TGL GT2) - 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 Threads)

Considering that the vertex lighting in question was added in this new 4.4.dev3 version, it's not suprising that it's not noticable. Lmao, just noticed that you were the one that wrote the blog post detailing the features even.

But yes, I would hope that it's not reproducable in versions that feature the normal per-pixel shading but it's nice that you confirmed it 👍

@Momonyaro Momonyaro changed the title Vertex Lighting clipping on the bottom of viewport/camera/screen when resolution doesn't match project viewport width/height Vertex Lighting clipping on the bottom of viewport/camera/screen for some resolutions Oct 23, 2024
@Momonyaro
Copy link
Author

Momonyaro commented Oct 23, 2024

Alright, final post from me here for a while until someone starts taking a peek.

I've tried the example project on three separate computers. My linux PC, a MacBook Pro 2019 from work and one of my friends windows 10 stationary PC.

All three computers experienced the bug at more than one of the resolutions featured in the example project.
I will list the resolutions below and tag what computer experienced the issue for each.

  • 2560x1440 (MacBook Pro, Linux PC)
  • 1440x1080 (Linux PC [The right edge this time? was using windowed mode])
  • 1280x1024 (MacBook Pro, Linux PC, Windows 10 PC)
  • 1366x768 (MacBook Pro, Linux PC, Windows 10 PC)
  • 1280x768 (MacBook Pro, Linux PC, Windows 10 PC)
  • 1024x768 (MacBook Pro, Linux PC, Windows 10 PC)

Now it's interesting to note that 2560x1440 did not have the issue when testing on the Windows 10 PC. I do not know what the cause of that could be except a suspicion that it's because his monitors are 1920x1080 compared to the two other computers that had screen resolutions of 2560x1440.

All the computers tried running the example project both from the editor and from a exported version. The resolutions were consistent between versions.

I hope someone can get some useful info from all this rambling (sorry if I seemed impatient but I lost a good bit of sleep due to this issue). Please reach out if you need any more information and I'll happily lend a hand.

Happy Hunting!

@Momonyaro Momonyaro changed the title Vertex Lighting clipping on the bottom of viewport/camera/screen for some resolutions [4.4.dev3] Forward+ Vertex Lighting clipping on the bottom of viewport/camera/screen for some resolutions Oct 28, 2024
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

2 participants