Closed
Description
Tested versions
Reproducible in 4.5.dev.03bd8ba9c
System information
Arch Linux Vulkan (Forward+) - Dedicated AMD Radeon RX 6600 (RADV NAVI23)
Issue description
When attempting to read a sampler2D within a shader that is a global uniform from the project settings, the image will be all white instead of what is intended or set.
Steps to reproduce
Create a new project
go into project settings and add go to shader globals, then add a new one named "test", as a sampler2D type.
set that test to any image you want, or even a NoiseTexture with the apropriate noise generator and such, to make a texture that can be seen.
create a sprite2d, or anything visible, it doesnt matter what
set a ShaderMaterial for its material
give it one of these shaders
for 2d:
shader_type canvas_item;
global uniform sampler2D test : source_color;
void fragment() {
COLOR = texture(test, UV);
}
for 3d:
shader_type spatial;
global uniform sampler2D test : source_color;
void fragment() {
ALBEDO = texture(test, UV).rgb;
}
Minimal reproduction project (MRP)
N/A
Metadata
Metadata
Assignees
Type
Projects
Status
Immediate Blocker