|
Blender V4.3
|
Go to the source code of this file.
Functions | |
| static float3 | geographical_to_direction (float lat, float lon) |
| static float3 | spec_to_xyz (const float *spectrum) |
| static float | density_rayleigh (float height) |
| static float | density_mie (float height) |
| static float | density_ozone (float height) |
| static float | phase_rayleigh (float mu) |
| static float | phase_mie (float mu) |
| static bool | surface_intersection (float3 pos, float3 dir) |
| static float3 | atmosphere_intersection (float3 pos, float3 dir) |
| static float3 | ray_optical_depth (float3 ray_origin, float3 ray_dir) |
| static void | single_scattering (float3 ray_dir, float3 sun_dir, float3 ray_origin, float air_density, float dust_density, float ozone_density, float *r_spectrum) |
| void | SKY_nishita_skymodel_precompute_texture (float *pixels, int stride, int start_y, int end_y, int width, int height, float sun_elevation, float altitude, float air_density, float dust_density, float ozone_density) |
| static void | sun_radiation (float3 cam_dir, float altitude, float air_density, float dust_density, float solid_angle, float *r_spectrum) |
| void | SKY_nishita_skymodel_precompute_sun (float sun_elevation, float angular_diameter, float altitude, float air_density, float dust_density, float *r_pixel_bottom, float *r_pixel_top) |
Variables | |
| static const float | rayleigh_scale = 8e3f |
| static const float | mie_scale = 1.2e3f |
| static const float | mie_coeff = 2e-5f |
| static const float | mie_G = 0.76f |
| static const float | sqr_G = mie_G * mie_G |
| static const float | earth_radius = 6360e3f |
| static const float | atmosphere_radius = 6420e3f |
| static const int | steps = 32 |
| static const int | num_wavelengths = 21 |
| static const int | min_wavelength = 380 |
| static const int | max_wavelength = 780 |
| static const float | step_lambda = (max_wavelength - min_wavelength) / (num_wavelengths - 1) |
| static const float | irradiance [] |
| static const float | rayleigh_coeff [] |
| static const float | ozone_coeff [] |
| static const float | cmf_xyz [][3] |
| static const int | quadrature_steps = 8 |
| static const float | quadrature_nodes [] |
| static const float | quadrature_weights [] |
Definition at line 169 of file sky_nishita.cpp.
References atmosphere_radius, b, dot(), len_squared(), make_float3(), pos, sqr(), sqrtf, float3::x, float3::y, and float3::z.
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 126 of file sky_nishita.cpp.
References expf, and mie_scale.
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 131 of file sky_nishita.cpp.
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 121 of file sky_nishita.cpp.
References expf, and rayleigh_scale.
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 104 of file sky_nishita.cpp.
References cosf, make_float3(), and sinf.
Referenced by SKY_nishita_skymodel_precompute_sun(), and SKY_nishita_skymodel_precompute_texture().
Definition at line 148 of file sky_nishita.cpp.
References M_PI_F, mie_G, powf, sqr(), and sqr_G.
Referenced by single_scattering().
Definition at line 143 of file sky_nishita.cpp.
Referenced by single_scattering().
Definition at line 177 of file sky_nishita.cpp.
References atmosphere_intersection(), density_mie(), density_ozone(), density_rayleigh(), distance(), earth_radius, len, make_float3(), P, quadrature_nodes, quadrature_steps, and quadrature_weights.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 213 of file sky_nishita.cpp.
References atmosphere_intersection(), density_mie(), density_ozone(), density_rayleigh(), distance(), dot(), earth_radius, expf, irradiance, len, make_float3(), mie_coeff, num_wavelengths, ozone_coeff, P, phase_mie(), phase_rayleigh(), ray_optical_depth(), rayleigh_coeff, reduce_add(), steps, and surface_intersection().
Referenced by SKY_nishita_skymodel_precompute_texture().
| void SKY_nishita_skymodel_precompute_sun | ( | float | sun_elevation, |
| float | angular_diameter, | ||
| float | altitude, | ||
| float | air_density, | ||
| float | dust_density, | ||
| float * | r_pixel_bottom, | ||
| float * | r_pixel_top ) |
Definition at line 364 of file sky_nishita.cpp.
References cosf, geographical_to_direction(), M_2PI_F, num_wavelengths, spec_to_xyz(), sun_radiation(), float3::x, float3::y, and float3::z.
Referenced by SkyTextureNode::get_sun_average_radiance(), and sky_texture_precompute_nishita().
| void SKY_nishita_skymodel_precompute_texture | ( | float * | pixels, |
| int | stride, | ||
| int | start_y, | ||
| int | end_y, | ||
| int | width, | ||
| int | height, | ||
| float | sun_elevation, | ||
| float | altitude, | ||
| float | air_density, | ||
| float | dust_density, | ||
| float | ozone_density ) |
Definition at line 296 of file sky_nishita.cpp.
References earth_radius, geographical_to_direction(), M_2PI_F, M_PI_2_F, M_PI_F, make_float3(), num_wavelengths, single_scattering(), spec_to_xyz(), sqr(), float3::x, float3::y, and float3::z.
Referenced by SkyLoader::load_pixels(), and blender::nodes::node_shader_tex_sky_cc::node_shader_gpu_tex_sky().
Definition at line 109 of file sky_nishita.cpp.
References cmf_xyz, make_float3(), num_wavelengths, step_lambda, float3::x, float3::y, and float3::z.
Referenced by SKY_nishita_skymodel_precompute_sun(), and SKY_nishita_skymodel_precompute_texture().
|
static |
Definition at line 345 of file sky_nishita.cpp.
References earth_radius, expf, irradiance, make_float3(), mie_coeff, num_wavelengths, ray_optical_depth(), rayleigh_coeff, float3::x, and float3::y.
Referenced by SKY_nishita_skymodel_precompute_sun().
Definition at line 155 of file sky_nishita.cpp.
References b, dot(), earth_radius, len_squared(), pos, sqr(), and float3::z.
Referenced by single_scattering().
|
static |
Definition at line 19 of file sky_nishita.cpp.
Referenced by atmosphere_intersection().
|
static |
Definition at line 54 of file sky_nishita.cpp.
Referenced by spec_to_xyz().
|
static |
Definition at line 18 of file sky_nishita.cpp.
Referenced by ray_optical_depth(), single_scattering(), SKY_nishita_skymodel_precompute_texture(), sun_radiation(), and surface_intersection().
|
static |
Definition at line 27 of file sky_nishita.cpp.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 23 of file sky_nishita.cpp.
Definition at line 15 of file sky_nishita.cpp.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 16 of file sky_nishita.cpp.
Referenced by phase_mie().
|
static |
Definition at line 14 of file sky_nishita.cpp.
Referenced by density_mie().
|
static |
Definition at line 22 of file sky_nishita.cpp.
|
static |
Definition at line 21 of file sky_nishita.cpp.
Referenced by single_scattering(), SKY_nishita_skymodel_precompute_sun(), SKY_nishita_skymodel_precompute_texture(), spec_to_xyz(), and sun_radiation().
|
static |
Definition at line 45 of file sky_nishita.cpp.
Referenced by single_scattering().
|
static |
Definition at line 87 of file sky_nishita.cpp.
Referenced by ray_optical_depth().
|
static |
Definition at line 86 of file sky_nishita.cpp.
Referenced by ray_optical_depth().
|
static |
Definition at line 95 of file sky_nishita.cpp.
Referenced by ray_optical_depth().
|
static |
Definition at line 36 of file sky_nishita.cpp.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 13 of file sky_nishita.cpp.
Referenced by density_rayleigh().
Definition at line 17 of file sky_nishita.cpp.
Referenced by phase_mie().
|
static |
Definition at line 25 of file sky_nishita.cpp.
Referenced by spec_to_xyz().
|
static |
Definition at line 20 of file sky_nishita.cpp.
Referenced by _bli_array_iter_spiral_square(), annotation_smooth_buffer(), BKE_undosys_stack_limit_steps_and_memory(), bmo_spin_exec(), blender::nodes::node_shader_map_range_cc::build_float_stepped(), blender::nodes::node_shader_map_range_cc::build_vector_stepped(), blender::ed::sculpt_paint::auto_mask::cache_init(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_grids(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_mesh(), cloth_calc_helper_forces(), compress_reconstruct_steps(), create_reconstruct_steps_for_struct(), blender::draw::curves_ensure_procedural_data(), DNA_reconstruct_info_create(), do_path_effectors(), draw_distortion(), draw_horizontal_scale_indicators(), draw_parallel_lines(), draw_vertical_scale_indicators(), dynamicPaint_doEffectStep(), dynamicPaint_doSmudge(), dynamicPaint_doStep(), dynamicPaint_doWaveStep(), dynamicPaint_prepareEffectStep(), ED_undo_push(), edbm_extrude_repeat_exec(), edbm_screw_exec(), edbm_spin_exec(), evaluate_curve_type_object(), gpencil_undo_push(), init_test_curve(), integrate_particle(), NODE_DEFINE(), NODE_DEFINE(), object_motion_steps(), reconstruct_struct(), BVH2::refit_primitives(), blender::draw::overlay::ShapeCache::ShapeCache(), single_scattering(), svm_node_map_range(), svm_node_vector_map_range(), ui_draw_gradient(), blender::compositor::PosterizeOperation::update_memory_buffer_partial(), blender::compositor::SunBeamsOperation::update_memory_buffer_partial(), blender::ed::object::vertex_group_quantize_exec(), and blender::ed::object::vgroup_quantize_subset().