0 votes

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 :)

in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories