Blender
V3.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 168 of file sky_nishita.cpp.
References atmosphere_radius, usdtokens::b(), Freestyle::c, blender::math::dot(), len_squared(), make_float3, pos, sqr(), sqrtf, t, float3::x, float3::y, and float3::z.
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 125 of file sky_nishita.cpp.
References expf, height, and mie_scale.
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 130 of file sky_nishita.cpp.
References height.
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 120 of file sky_nishita.cpp.
References expf, height, and rayleigh_scale.
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 103 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 147 of file sky_nishita.cpp.
References M_PI_F, mie_G, powf, sqr(), and sqr_G.
Referenced by single_scattering().
Definition at line 142 of file sky_nishita.cpp.
Referenced by single_scattering().
Definition at line 176 of file sky_nishita.cpp.
References atmosphere_intersection(), usdtokens::density(), density_mie(), density_ozone(), density_rayleigh(), blender::math::distance(), earth_radius, height, len, make_float3, P(), quadrature_nodes, quadrature_steps, and quadrature_weights.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 212 of file sky_nishita.cpp.
References atmosphere_intersection(), usdtokens::density(), density_mie(), density_ozone(), density_rayleigh(), blender::math::distance(), blender::math::dot(), earth_radius, expf, height, 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 363 of file sky_nishita.cpp.
References bottom, cosf, geographical_to_direction(), M_2PI_F, num_wavelengths, spec_to_xyz(), sun_radiation(), top, float3::x, float3::y, and float3::z.
Referenced by 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 295 of file sky_nishita.cpp.
References earth_radius, geographical_to_direction(), height, M_2PI_F, M_PI_2_F, M_PI_F, make_float3, num_wavelengths, single_scattering(), spec_to_xyz(), sqr(), stride, width, float3::x, x, float3::y, y, and float3::z.
Referenced by SkyLoader::load_pixels().
Definition at line 108 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 344 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 154 of file sky_nishita.cpp.
References usdtokens::b(), Freestyle::c, blender::math::dot(), earth_radius, len_squared(), pos, sqr(), t, and float3::z.
Referenced by single_scattering().
|
static |
Definition at line 18 of file sky_nishita.cpp.
Referenced by atmosphere_intersection().
|
static |
Definition at line 53 of file sky_nishita.cpp.
Referenced by spec_to_xyz().
|
static |
Definition at line 17 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 26 of file sky_nishita.cpp.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 22 of file sky_nishita.cpp.
Definition at line 14 of file sky_nishita.cpp.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 15 of file sky_nishita.cpp.
Referenced by phase_mie().
|
static |
Definition at line 13 of file sky_nishita.cpp.
Referenced by density_mie().
|
static |
Definition at line 21 of file sky_nishita.cpp.
|
static |
Definition at line 20 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 44 of file sky_nishita.cpp.
Referenced by single_scattering().
|
static |
Definition at line 86 of file sky_nishita.cpp.
Referenced by ray_optical_depth().
|
static |
Definition at line 85 of file sky_nishita.cpp.
Referenced by ray_optical_depth().
|
static |
Definition at line 94 of file sky_nishita.cpp.
Referenced by ray_optical_depth().
|
static |
Definition at line 35 of file sky_nishita.cpp.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 12 of file sky_nishita.cpp.
Referenced by density_rayleigh().
Definition at line 16 of file sky_nishita.cpp.
Referenced by phase_mie().
|
static |
Definition at line 24 of file sky_nishita.cpp.
Referenced by spec_to_xyz().
|
static |
Definition at line 19 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(), cloth_calc_helper_forces(), compress_reconstruct_steps(), create_reconstruct_steps_for_struct(), 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_smooth_buffer(), gpencil_stroke_simplify_fixed_exec(), gpencil_undo_push(), init_test_curve(), integrate_particle(), NODE_DEFINE(), object_motion_steps(), reconstruct_struct(), BVH2::refit_primitives(), single_scattering(), btLemkeAlgorithm::solve(), svm_node_map_range(), svm_node_vector_map_range(), ui_draw_gradient(), blender::compositor::PosterizeOperation::update_memory_buffer_partial(), vertex_group_quantize_exec(), and vgroup_quantize_subset().