Fix T38524: Cycles not rendering sky texture correct when the direction vector is not normalized.

This commit is contained in:
Brecht Van Lommel 2014-02-06 20:53:58 +01:00
parent 28936a4150
commit 135e4e69a1
Notes: blender-bot 2023-02-14 11:14:27 +01:00
Referenced by issue #38524, Setting sky texture direction with the python console has no effect
1 changed files with 1 additions and 1 deletions

View File

@ -646,7 +646,7 @@ static ShaderNode *add_node(Scene *scene, BL::BlendData b_data, BL::Scene b_scen
BL::ShaderNodeTexSky b_sky_node(b_node);
SkyTextureNode *sky = new SkyTextureNode();
sky->type = SkyTextureNode::type_enum[(int)b_sky_node.sky_type()];
sky->sun_direction = get_float3(b_sky_node.sun_direction());
sky->sun_direction = normalize(get_float3(b_sky_node.sun_direction()));
sky->turbidity = b_sky_node.turbidity();
sky->ground_albedo = b_sky_node.ground_albedo();
get_tex_mapping(&sky->tex_mapping, b_sky_node.texture_mapping());