godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.48k stars 21.07k forks source link

Vertex Lighting clipping on the bottom of viewport/camera/screen when resolution doesn't match project viewport width/height #98440

Open Momonyaro opened 5 hours ago

Momonyaro commented 5 hours ago

Tested versions

System information

Linux (Zorin OS) - Godot v4.4.dev3.official [f4af8201b] - 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 :crossed_fingers:

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 commented 5 hours ago

Should perhaps mention that I was notified that there was another mention of this issue in a pull request https://github.com/godotengine/godot/pull/83360#pullrequestreview-2088804940

clayjohn commented 5 hours ago

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 commented 5 hours ago

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