Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_shader.cpp
| Show First 20 Lines • Show All 809 Lines • ▼ Show 20 Lines | else if (b_node.is_a(&RNA_ShaderNodeTexSky)) { | ||||
| BL::ShaderNodeTexSky b_sky_node(b_node); | BL::ShaderNodeTexSky b_sky_node(b_node); | ||||
| SkyTextureNode *sky = new SkyTextureNode(); | SkyTextureNode *sky = new SkyTextureNode(); | ||||
| sky->type = (NodeSkyType)b_sky_node.sky_type(); | sky->type = (NodeSkyType)b_sky_node.sky_type(); | ||||
| sky->sun_direction = normalize(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->turbidity = b_sky_node.turbidity(); | ||||
| sky->ground_albedo = b_sky_node.ground_albedo(); | sky->ground_albedo = b_sky_node.ground_albedo(); | ||||
| sky->sun_disc = b_sky_node.sun_disc(); | sky->sun_disc = b_sky_node.sun_disc(); | ||||
| sky->sun_size = b_sky_node.sun_size(); | sky->sun_size = b_sky_node.sun_size(); | ||||
| sky->sun_intensity = b_sky_node.sun_intensity(); | |||||
| sky->sun_elevation = b_sky_node.sun_elevation(); | sky->sun_elevation = b_sky_node.sun_elevation(); | ||||
| sky->sun_rotation = b_sky_node.sun_rotation(); | sky->sun_rotation = b_sky_node.sun_rotation(); | ||||
| sky->altitude = b_sky_node.altitude(); | /* clamp altitude to avoid intersection issues */ | ||||
| sky->altitude = 1000.0f * clamp(b_sky_node.altitude(), 0.001f, 59.999f); | |||||
brecht: Do this clamping in `nodes.cpp`, so all applications using Cycles get this test. | |||||
| sky->air_density = b_sky_node.air_density(); | sky->air_density = b_sky_node.air_density(); | ||||
| sky->dust_density = b_sky_node.dust_density(); | sky->dust_density = b_sky_node.dust_density(); | ||||
| sky->ozone_density = b_sky_node.ozone_density(); | sky->ozone_density = b_sky_node.ozone_density(); | ||||
| BL::TexMapping b_texture_mapping(b_sky_node.texture_mapping()); | BL::TexMapping b_texture_mapping(b_sky_node.texture_mapping()); | ||||
| get_tex_mapping(&sky->tex_mapping, b_texture_mapping); | get_tex_mapping(&sky->tex_mapping, b_texture_mapping); | ||||
| node = sky; | node = sky; | ||||
| } | } | ||||
| else if (b_node.is_a(&RNA_ShaderNodeTexIES)) { | else if (b_node.is_a(&RNA_ShaderNodeTexIES)) { | ||||
| ▲ Show 20 Lines • Show All 685 Lines • Show Last 20 Lines | |||||
Do this clamping in nodes.cpp, so all applications using Cycles get this test.