Hi there,
maybe I completely misunderstood how shaders work, but I'm trying to create a ShaderMaterial that would, in a second render pass, apply some shader to an object's texture as defined by a SpatialTexture in the first render pass. I would have expected the fragment built-in COLOR to provide each pixel's color (including transparency) "as calculated so far" by previous passed, but with my current approach I get some (at least to me...) weird results.

A minimum (non)-working sample project consists of two MeshInstances, both having a SpatialMaterial featuring the Godot icon as albedo texture. The right mesh additionaly has a ShaderMaterial with the following shader code as second pass:
shader_type spatial;
render_mode unshaded;
void fragment() {
ALBEDO = UV.x * COLOR.rgb;
ALPHA = COLOR.a;
}
I would have expected the right mesh to display the Godot icon as a kind of horizontal brightness gradient; however, it seems that only the previously transparent pixels are affected and turned into non-transparent gradient pixeld.
What am I doing wrong?
Cheers, and happy Easter--
-- Torsten