godotengine / godot

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

Fog is weird in double precision #91066

Open fire opened 3 months ago

fire commented 3 months ago

Tested versions

Untested versions but suspicious

https://github.com/godotengine/godot/releases/tag/4.2.2-stable (double)

System information

Windows 11, Nvidia 3090, Vulkan forward+

Issue description

https://youtu.be/cNQ9ksd5cAw

Fog seems to be not working correctly. Seems to be split into layers instead of being even.

Steps to reproduce

Turning on fog causes this to happen on https://github.com/V-Sekai/godot-crappy-contraptions/commit/0fff44fa1bf2e70c2ce295a4bbfdc27cd07dbf1b

Minimal reproduction project (MRP)

godot-crappy-contraptions-main.zip

clayjohn commented 3 months ago

Just looking at that repo briefly, I wouldn't be surprised if https://github.com/V-Sekai/godot/commit/5f5bc2da49e61fbf8cc5efeabe67077e090aef2b was the culprit

fire commented 3 months ago

I'll take a look

fire commented 3 months ago

Unmerging that pr seemed to have no effect. What made the fog work was precision=single.

Calinou commented 3 months ago

I can't reproduce this on 4.3.dev b091162a9 (Linux, GeForce RTX 4090 with NVIDIA 550.67). I tested both Forward+ and Mobile, both give out the same appearance regardless of whether I'm using a single-precision or double-precision build.

Minimal reproduction project: test_fog.zip