Sky renderer: Don't invert Z component of light direction

This commit is contained in:
Jesse Dubay 2022-03-06 23:54:21 -08:00
parent 80345f7d4e
commit ff2a5c04b1
1 changed files with 1 additions and 1 deletions

View File

@ -1169,7 +1169,7 @@ void RendererSceneSkyRD::setup(RendererSceneEnvironmentRD *p_env, RID p_render_b
sky_light_data.direction[0] = world_direction.x;
sky_light_data.direction[1] = world_direction.y;
sky_light_data.direction[2] = -world_direction.z;
sky_light_data.direction[2] = world_direction.z;
float sign = storage->light_is_negative(base) ? -1 : 1;
sky_light_data.energy = sign * storage->light_get_param(base, RS::LIGHT_PARAM_ENERGY);