How to add moons to the sky?

That would all be done in the shader code, right?

Yes, it’d be a relatively simple addition to the shader code that engine generated by converting the material.

Here’s the intervention:

// ENGINE GENERATED DECLARATIONS

uniform sampler2D moon_texture: source_color;

void sky() {
	// ENGINE GENERATED CODE FOR sky() FUNCTION
	
	vec4 moons = texture(moon_texture, SCREEN_UV);
	COLOR = mix(COLOR, moons.rgb, moons.a);
}

Convert the procedural sky material to a shader, append the moon_texture uniform declaration at the end of existing uniforms block, and add the two lines of code at the end of sky() function. Assign the viewport texture in the inspector and you should be good to go.

Yes, that works like a charm. It also works when added to a PhysicalSkyMaterial that’s turned into a shader.

Thank you a lot.