|
Blender V5.0
|
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 aerosol_density, float ozone_density, float *r_spectrum) |
| void | SKY_single_scattering_precompute_texture (float *pixels, int stride, int width, int height, float sun_elevation, float altitude, float air_density, float aerosol_density, float ozone_density) |
| static void | sun_radiation (float3 cam_dir, float altitude, float air_density, float aerosol_density, float solid_angle, float *r_spectrum) |
| void | SKY_single_scattering_precompute_sun (float sun_elevation, float angular_diameter, float altitude, float air_density, float aerosol_density, float r_pixel_bottom[3], float r_pixel_top[3]) |
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 164 of file sky_single_scattering.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 128 of file sky_single_scattering.cpp.
References expf, and MIE_SCALE.
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 133 of file sky_single_scattering.cpp.
References fabs().
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 123 of file sky_single_scattering.cpp.
References expf, and RAYLEIGH_SCALE.
Referenced by ray_optical_depth(), and single_scattering().
Definition at line 106 of file sky_single_scattering.cpp.
References cosf, make_float3(), and sinf.
Referenced by SKY_single_scattering_precompute_sun(), and SKY_single_scattering_precompute_texture().
Definition at line 143 of file sky_single_scattering.cpp.
References M_PI_F, MIE_G, powf, sqr, and SQR_G.
Referenced by single_scattering().
Definition at line 138 of file sky_single_scattering.cpp.
Referenced by single_scattering().
Definition at line 172 of file sky_single_scattering.cpp.
References atmosphere_intersection(), density_mie(), density_ozone(), density_rayleigh(), distance(), EARTH_RADIUS, i, len, make_float3(), P, QUADRATURE_NODES, QUADRATURE_STEPS, and QUADRATURE_WEIGHTS.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 208 of file sky_single_scattering.cpp.
References atmosphere_intersection(), density_mie(), density_ozone(), density_rayleigh(), distance(), dot(), EARTH_RADIUS, expf, i, 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_single_scattering_precompute_texture().
| void SKY_single_scattering_precompute_sun | ( | float | sun_elevation, |
| float | angular_diameter, | ||
| float | altitude, | ||
| float | air_density, | ||
| float | aerosol_density, | ||
| float | r_pixel_bottom[3], | ||
| float | r_pixel_top[3] ) |
Definition at line 381 of file sky_single_scattering.cpp.
References clamp(), cosf, geographical_to_direction(), M_2PI_F, make_float3(), NUM_WAVELENGTHS, spec_to_xyz(), sun_radiation(), top, float3::x, float3::y, and float3::z.
Referenced by SkyTextureNode::get_sun_average_radiance(), and sky_texture_precompute_nishita().
| void SKY_single_scattering_precompute_texture | ( | float * | pixels, |
| int | stride, | ||
| int | width, | ||
| int | height, | ||
| float | sun_elevation, | ||
| float | altitude, | ||
| float | air_density, | ||
| float | aerosol_density, | ||
| float | ozone_density ) |
Definition at line 291 of file sky_single_scattering.cpp.
References begin(), clamp(), EARTH_RADIUS, fade(), geographical_to_direction(), M_2PI_F, M_PI_2_F, M_PI_F, make_float3(), NUM_WAVELENGTHS, single_scattering(), SKY_parallel_for(), spec_to_xyz(), sqr, float3::x, x, float3::y, 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 111 of file sky_single_scattering.cpp.
References CMF_XYZ, i, make_float3(), NUM_WAVELENGTHS, STEP_LAMBDA, float3::x, float3::y, and float3::z.
Referenced by SKY_single_scattering_precompute_sun(), and SKY_single_scattering_precompute_texture().
|
static |
Definition at line 362 of file sky_single_scattering.cpp.
References EARTH_RADIUS, expf, i, IRRADIANCE, make_float3(), MIE_COEFF, NUM_WAVELENGTHS, ray_optical_depth(), RAYLEIGH_COEFF, float3::x, and float3::y.
Referenced by SKY_single_scattering_precompute_sun().
Definition at line 150 of file sky_single_scattering.cpp.
References b, dot(), EARTH_RADIUS, len_squared(), pos, sqr, and float3::z.
Referenced by single_scattering().
|
static |
Definition at line 21 of file sky_single_scattering.cpp.
|
static |
Definition at line 56 of file sky_single_scattering.cpp.
Referenced by spec_to_xyz().
|
static |
Definition at line 20 of file sky_single_scattering.cpp.
|
static |
Definition at line 29 of file sky_single_scattering.cpp.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 25 of file sky_single_scattering.cpp.
Definition at line 17 of file sky_single_scattering.cpp.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 18 of file sky_single_scattering.cpp.
Referenced by phase_mie().
|
static |
Definition at line 16 of file sky_single_scattering.cpp.
Referenced by density_mie().
|
static |
Definition at line 24 of file sky_single_scattering.cpp.
|
static |
Definition at line 23 of file sky_single_scattering.cpp.
Referenced by single_scattering(), SKY_single_scattering_precompute_sun(), SKY_single_scattering_precompute_texture(), spec_to_xyz(), and sun_radiation().
|
static |
Definition at line 47 of file sky_single_scattering.cpp.
Referenced by single_scattering().
|
static |
Definition at line 89 of file sky_single_scattering.cpp.
Referenced by ray_optical_depth().
|
static |
Definition at line 88 of file sky_single_scattering.cpp.
Referenced by ray_optical_depth().
|
static |
Definition at line 97 of file sky_single_scattering.cpp.
Referenced by ray_optical_depth().
|
static |
Definition at line 38 of file sky_single_scattering.cpp.
Referenced by single_scattering(), and sun_radiation().
|
static |
Definition at line 15 of file sky_single_scattering.cpp.
Referenced by density_rayleigh().
Definition at line 19 of file sky_single_scattering.cpp.
|
static |
Definition at line 27 of file sky_single_scattering.cpp.
Referenced by spec_to_xyz().
|
static |
Definition at line 22 of file sky_single_scattering.cpp.
Referenced by single_scattering().