Modified the mobile renderer to apply the sky_transform operations in the same order as the forward_plus renderer.

Update rasterizer_scene_gles3.cpp

Apply sky_transform order fix to the gles3 renderer.
This commit is contained in:
Malcolm Nixon 2022-12-05 23:02:13 -05:00
parent f3e6750a7e
commit 0f8a968cd4
2 changed files with 3 additions and 3 deletions

View File

@ -788,7 +788,7 @@ void RasterizerSceneGLES3::_draw_sky(RID p_env, const Projection &p_projection,
} }
Basis sky_transform = environment_get_sky_orientation(p_env); Basis sky_transform = environment_get_sky_orientation(p_env);
sky_transform.invert(); sky_transform.invert();
sky_transform = p_transform.basis * sky_transform; sky_transform = sky_transform * p_transform.basis;
bool success = material_storage->shaders.sky_shader.version_bind_shader(shader_data->version, SkyShaderGLES3::MODE_BACKGROUND); bool success = material_storage->shaders.sky_shader.version_bind_shader(shader_data->version, SkyShaderGLES3::MODE_BACKGROUND);
if (!success) { if (!success) {

View File

@ -1661,7 +1661,7 @@ void SkyRD::update_res_buffers(RID p_env, uint32_t p_view_count, const Projectio
projections = &camera; projections = &camera;
} }
sky_transform = p_transform.basis * sky_transform; sky_transform = sky_transform * p_transform.basis;
if (shader_data->uses_quarter_res) { if (shader_data->uses_quarter_res) {
PipelineCacheRD *pipeline = &shader_data->pipelines[view_count > 1 ? SKY_VERSION_QUARTER_RES_MULTIVIEW : SKY_VERSION_QUARTER_RES]; PipelineCacheRD *pipeline = &shader_data->pipelines[view_count > 1 ? SKY_VERSION_QUARTER_RES_MULTIVIEW : SKY_VERSION_QUARTER_RES];
@ -1754,7 +1754,7 @@ void SkyRD::draw(RD::DrawListID p_draw_list, RID p_env, RID p_fb, uint32_t p_vie
projections = &camera; projections = &camera;
} }
sky_transform = p_transform.basis * sky_transform; sky_transform = sky_transform * p_transform.basis;
PipelineCacheRD *pipeline = &shader_data->pipelines[view_count > 1 ? SKY_VERSION_BACKGROUND_MULTIVIEW : SKY_VERSION_BACKGROUND]; PipelineCacheRD *pipeline = &shader_data->pipelines[view_count > 1 ? SKY_VERSION_BACKGROUND_MULTIVIEW : SKY_VERSION_BACKGROUND];