Sky renderer: Don't invert Z component of light direction
This commit is contained in:
parent
80345f7d4e
commit
ff2a5c04b1
|
@ -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[0] = world_direction.x;
|
||||||
sky_light_data.direction[1] = world_direction.y;
|
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;
|
float sign = storage->light_is_negative(base) ? -1 : 1;
|
||||||
sky_light_data.energy = sign * storage->light_get_param(base, RS::LIGHT_PARAM_ENERGY);
|
sky_light_data.energy = sign * storage->light_get_param(base, RS::LIGHT_PARAM_ENERGY);
|
||||||
|
|
Loading…
Reference in New Issue