|
Blender V5.3
|
#include "eevee_sampling_shared.hh"#include "gpu_shader_math_base.bsl.hh"#include "gpu_shader_math_constants.bsl.hh"#include "gpu_shader_math_safe.bsl.hh"Go to the source code of this file.
Classes | |
| struct | eevee::Sampling |
Namespaces | |
| namespace | eevee |
| namespace | random |
| namespace | random::detail |
Variables | |
| static constexpr float | random::detail::pcg_rcp = 1.0f / float(0xffffffffU) |
Sampling data accessors, noise functions and hash sequences. Also contains several sample mapping functions.
References:
[damm2012] Holger Dammertz Hammersley Points on Spheres https://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html
[onei2014] Melissa O'Neill PCG: A Family of Simple Fast Space-Efficient Good Algorithms for Random Number Generation. 2014 https://www.pcg-random.org/pdf/hmc-cs-2014-0905.pdf
[jorg2014] Jorge Jimenez Next Generation Post-processing in COD Advanced Warfare SIGGRAPH 2014 Advances in Real-Time Rendering https://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare/
[wymn2017] Chris Wyman and Morgan McGuire Hashed Alpha Testing ACM I3D 2017 https://research.nvidia.com/labs/rtr/publication/wyman2017hashed/
[jarz2020] Mark Jarzynski and Marc Olano Hash Functions for GPU Rendering JCGT 2020 https://www.jcgt.org/published/0009/03/02/
Definition in file eevee_sampling_lib.bsl.hh.
| float2 regular_grid_2d | ( | int | i, |
| int | sample_count ) |
Definition at line 229 of file eevee_sampling_lib.bsl.hh.
References float, regular_grid_2d(), and sqrt.
Referenced by regular_grid_2d().
Returns a point in a ball that is "uniformly" distributed after projection along any axis. PDF = unknown
Definition at line 283 of file eevee_sampling_lib.bsl.hh.
References sample_ball(), sample_sphere(), sqrt, and float3::z.
Referenced by sample_ball(), and eevee::light::shadow_setup_main().
Definition at line 244 of file eevee_sampling_lib.bsl.hh.
References cos, M_TAU, sample_circle(), sign(), sin_phi(), sqrt, and square().
Referenced by eevee::fast_gi::eval(), sample_circle(), sample_cos_hemisphere(), sample_cylinder(), sample_disk(), sample_hemisphere(), sample_sphere(), sample_uniform_cone(), and eevee::shadow_pcf_offset().
Cosine-weighted direction in hemisphere rand contains 2 random floats in the [0..1] range PDF = cos_angle / pi
Definition at line 321 of file eevee_sampling_lib.bsl.hh.
References cos_theta(), safe_sqrt(), sample_circle(), sample_cos_hemisphere(), sin_theta(), float2::x, and float2::y.
Referenced by bsdf_diffuse_sample(), bsdf_oren_nayar_sample(), bsdf_translucent_sample(), bxdf_diffuse_sample(), point_light_sample(), sample_cos_hemisphere(), sample_cos_hemisphere(), sample_cos_hemisphere(), and spot_light_sample().
Cosine-weighted direction in hemisphere rand is a random point on a unit cylinder PDF = cos_angle / pi
Definition at line 333 of file eevee_sampling_lib.bsl.hh.
References cos_theta(), safe_sqrt(), sample_cos_hemisphere(), sin_from_cos(), and float3::x.
Definition at line 261 of file eevee_sampling_lib.bsl.hh.
References sample_circle(), sample_cylinder(), float2::x, and float2::y.
Referenced by eevee::lut::integrate(), eevee::ray_generate_direction(), and sample_cylinder().
Definition at line 253 of file eevee_sampling_lib.bsl.hh.
References sample_circle(), sample_disk(), sqrt, float2::x, and float2::y.
Referenced by eevee::dof::Accumulator::dof_gather_init(), eevee::dof::Accumulator::dof_slight_focus_gather(), eevee::film::Film::panoramic_sample_get(), sample_disk(), eevee::shadow_ray_generate_punctual(), eevee::light::shadow_setup_main(), and eevee::raytracing::denoise::spatial_main().
Uniform hemisphere distribution. rand is 2 random float in the [0..1] range. Returns point on a Z positive hemisphere of radius 1 and centered on the origin. PDF = 1 / (2 * pi)
Definition at line 295 of file eevee_sampling_lib.bsl.hh.
References cos_theta(), safe_sqrt(), sample_circle(), sample_hemisphere(), sin_theta(), square(), float2::x, and float2::y.
Referenced by sample_hemisphere().
Uniform sphere distribution. rand is 2 random float in the [0..1] range. Returns point on a Z positive hemisphere of radius 1 and centered on the origin. PDF = 1 / (4 * pi)
Definition at line 272 of file eevee_sampling_lib.bsl.hh.
References cos_theta(), safe_sqrt(), sample_circle(), sample_sphere(), sin_theta(), float2::x, and float2::y.
Referenced by sample_ball(), and sample_sphere().
Uniform cone distribution. rand is 2 random float in the [0..1] range. cos_angle is the cosine of the half angle. Returns point on a Z positive hemisphere of radius 1 and centered on the origin. PDF = 1 / (2 * pi * (1 - cos_angle))
Definition at line 309 of file eevee_sampling_lib.bsl.hh.
References cos_theta(), mix, safe_sqrt(), sample_circle(), sample_uniform_cone(), sin_theta(), square(), float2::x, and float2::y.
Referenced by background_sun_sample(), bsdf_diffuse_toon_sample(), bsdf_glossy_toon_sample(), eevee::lightprobe::sphere::mip_convolve(), point_light_sample(), sample_uniform_cone(), sample_uniform_cone(), eevee::shadow_ray_generate_directional(), eevee::light::shadow_setup_main(), spot_light_sample(), and sun_light_sample().