### Godot version

4.2.dev 5ee983188de97ae027f9b9c1443438063f708a7e

### System information

Windows 10 - Compatibility renderer 

### Issue description

When running a VR project sky contribution is not working in the compatibility renderer:

![image](https://github.com/godotengine/godot/assets/1945449/7aa19569-95c8-41a2-913b-37b81f4728a7)

It is working fine in normal mode. Can be worked around by setting sky contribution to 0 and providing an ambient color.

### Steps to reproduce

Try any project with a proper sky setup in XR, just switch to compatibility renderer.

### Minimal reproduction project

I'll try and create an MVP soon that can be used without XR hardware, but for now this can be used:
https://github.com/BastiaanOlij/godot_openxr_demo
}
				}
			}
			if (prev_shader != shader || prev_variant != instance_variant || spec_constants != prev_spec_constants) {
				bool success = material_storage->shaders.scene_shader.version_bind_shader(shader->version, instance_variant, spec_constants);
				if (!success) {
					break;
				}
				float opaque_prepass_threshold = 0.0;
				if constexpr (p_pass_mode == PASS_MODE_DEPTH) {
					opaque_prepass_threshold = 0.99;
				} else if constexpr (p_pass_mode == PASS_MODE_SHADOW) {
					opaque_prepass_threshold = 0.1;
				}
				material_storage->shaders.scene_shader.version_set_uniform(SceneShaderGLES3::OPAQUE_PREPASS_THRESHOLD, opaque_prepass_threshold, shader->version, instance_variant, spec_constants);
				prev_shader = shader;
				prev_variant = instance_variant;
				prev_spec_constants = spec_constants;
			}
			
			if constexpr (p_pass_mode == PASS_MODE_COLOR || p_pass_mode == PASS_MODE_COLOR_TRANSPARENT) {
				GLES3::Config *config = GLES3::Config::get_singleton();
				
				if (uses_additive_lighting) {
					if (pass < int32_t(inst->light_passes.size())) {
						int32_t shadow_id = inst->light_passes[pass].shadow_id;
						if (shadow_id >= 0) {
							uint32_t light_id = inst->light_passes[pass].light_id;
							bool is_omni = inst->light_passes[pass].is_omni;
							SceneShaderGLES3::Uniforms uniform_name = is_omni ? SceneShaderGLES3::OMNI_LIGHT_INDEX : SceneShaderGLES3::SPOT_LIGHT_INDEX;