godotengine / godotengine/godot
2D instance uniform with source_color flag incorrectly shows in Vulkan
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in 4.4.beta1, 4.4.beta2, 4.4.beta3
### System information
Godot v4.4.beta2 - Arch Linux #1 SMP PREEMPT_DYNAMIC Sat, 18 Jan 2025 02:26:57 +0000 on Wayland - X11 display driver, Multi-window, 1 monitor - Vulkan (Mobile) - integrated Intel(R) Graphics (ADL GT2) - 12th Gen Intel(R) Core(TM) i5-1235U (12 threads)
### Issue description
Looks like instance uniforms with source_color hint is self multiplicated on Vulkan
OpenGL:

Vulkan:

Nor reproducible in 3D.
### Steps to reproduce
1. Create CanvasItem Shader
2. Add instance uniform with source_color hint, make shader use this color
3. Assign to any CanvasItem
4. Change instance uniform color to something not white
5. Notice difference between color preview in inspector and actual color
### Minimal reproduction project (MRP)
[mrp.zip](https://github.com/user-attachments/files/18762044/mrp.zip)
Contributor guide
Research direction
Start by running the attached MRP with the CanvasItem shader on both Vulkan and OpenGL, following the listed reproduction steps. Trace the 2D instance uniform using the source_color hint and compare the inspector preview with the rendered result; done means the Vulkan result matches the intended color without the reported self-multiplication.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100