godotengine / godotengine/godot
Blender/GLTF vertex coloring is wrong with OpenGL Compatibility renderer.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible from Godot 4.0+.
I noticed this with 4.2.1.stable but it also happens with 4.0.stable and 4.3.dev2.
Not a regression from a prior release of Godot 4.
### System information
Godot v4.2.1.stable - macOS 14.1.1 - Vulkan (Mobile) - integrated Apple M1 Pro - Apple M1 Pro (10 Threads)
### Issue description
With the compatibility renderer, vertex colors are way darker than they should be, like there's some incorrect sRGB <-> Linear color space conversion going on or something. They appear correct with the Mobile and Forward+ renderers. I've observed this with models made in Blender at least... Here are a couple of comparisons. The wall model provided with the reproduction project I made and colored using Blender. It has no textures, just vertex colors.
Vulkan:

OpenGL:

Vulkan:

OpenGL (Different map position but it shows the color difference):

I worry that fixing this bug would be a breaking change for some users, but as it stands, vertex colors aren't very useful.
### Steps to reproduce
Open the test project in any version of Godot 4.
Observe how the coloring is different between OpenGL and Vulkan. The Vulkan colors are the correct ones, at least on my computer. Maybe it depends on OS or GPU?
### Minimal reproduction project (MRP)
[Repro_VertexColorCompatibilityRenderer.zip](https://github.com/godotengine/godot/files/14015162/Repro_VertexColorCompatibilityRenderer.zip)
Contributor guide
Assessment
This issue has not been assessed yet.