godotengine / godot

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

Outline around objects in transparent `Viewport` when using Vulkan #78004

Open YeldhamDev opened 1 year ago

YeldhamDev commented 1 year ago

Godot version

4.0.dev [2985a9a]

System information

Kubuntu GNU/Linux 23.04

Issue description

If you use a Viewport with transparent_bg enabled, and you also happen to use Vulkan for the rendering, and dark outline will be visible around the stuff inside:

Vulkan OpenGL
Screenshot_20230608_101505 Screenshot_20230608_101412

Steps to reproduce

Minimal reproduction project

ViewTransparentBug.zip

Braveo commented 1 year ago

This is currently happening to me with 4.1.beta2.mono as well. Using nearest seems to work fine, so I'm guessing linear accidentally interpolates with the transparent background's rgb values being 0,0,0?

jsjtxietian commented 1 year ago

Tested in Godot v4.2.dev (691634969) - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3619) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)

It seems in the provided MRP, at least in my test all three render mode gave the same result as :

image