Why is this unshaded MeshInstance using the clear colour when playing the project?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By schnappischnap

I have a really simple scene with the following set-up:

Spatial
-Camera
-MeshInstance
-MeshInstance2

The first MeshInstance is a big sphere with this shader:

shader_type spatial;
render_mode unshaded;

void fragment()
{
    ALBEDO = vec3(0.5,0.5,0.5);
}

MeshInstance2 is a small cube with a spatial shader, set to unshaded and given a red albedo (all the other settings are default).

The default environment background mode is set to clear color.

It looks how I’d expect in the 3D view:
3D view, cube is red
But when I play the project the cube isn’t red, it’s the same colour as the project clear colour:
Play mode, cube uses clear colour
Is there something obvious I’m missing, or is there an issue with my computer? TIA :slight_smile:

Have you found any solution? I got into the same issue

abrahamzsombornagy | 2022-11-23 05:08