|
Blender V5.3
|
#include <eevee_sampling.hh>
Public Member Functions | |
| Sampling (Instance &inst, ClampData &clamp_data) | |
| ~Sampling () | |
| template<typename PassType> | |
| void | bind_resources (PassType &pass) |
| float | rng_get (eSamplingDimension dimension) const |
| float2 | rng_2d_get (eSamplingDimension starting_dimension) const |
| float3 | rng_3d_get (eSamplingDimension starting_dimension) const |
| bool | finished () const |
| bool | finished_viewport () const |
| bool | interactive_mode () const |
| uint64_t | sample_count () const |
| uint64_t | sample_index () const |
| bool | use_custom_pixel_jitter_sample () const |
| bool | use_clamp_direct () const |
| bool | use_clamp_indirect () const |
| bool | use_direct_scale () const |
| float | direct_scale () const |
| bool | use_indirect_scale () const |
| float | indirect_scale () const |
| bool | do_render_sync () const |
| uint64_t | dof_ring_count_get () const |
| uint64_t | dof_sample_count_get () const |
Static Public Member Functions | |
Cumulative Distribution Function (CDF) | |
| static void | cdf_from_curvemapping (const CurveMapping &curve, Vector< float > &cdf) |
| static void | cdf_invert (Vector< float > &cdf, Vector< float > &inverted_cdf) |
Sampling | |
| void | init (const Scene *scene) |
| void | init (const Object &probe_object) |
| void | end_sync () |
| void | step () |
| void | reset () |
| bool | is_reset () const |
| void | update_time () |
Sampling patterns | |
| void | dof_disk_sample_get (float *r_radius, float *r_theta) const |
| static float3 | sample_ball (const float3 &rand) |
| static float2 | sample_disk (const float2 &rand) |
| static float3 | sample_hemisphere (const float2 &rand) |
| static float3 | sample_sphere (const float2 &rand) |
| static float2 | sample_spiral (const float2 &rand) |
Definition at line 25 of file eevee_sampling.hh.
Definition at line 86 of file eevee_sampling.hh.
|
inline |
Definition at line 87 of file eevee_sampling.hh.
Definition at line 101 of file eevee_sampling.hh.
References SAMPLING_BUF_SLOT.
|
static |
Creates a discrete cumulative distribution function table from a given curvemapping. Output cdf vector is expected to already be sized according to the wanted resolution.
Definition at line 427 of file eevee_sampling.cc.
References blender::BKE_curvemapping_evaluateF(), blender::BLI_assert(), float, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::IndexRange::IndexRange(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::x.
Referenced by blender::eevee::MotionBlurModule::init().
|
static |
Inverts a cumulative distribution function. Output vector is expected to already be sized according to the wanted resolution.
Definition at line 444 of file eevee_sampling.cc.
References blender::BLI_assert(), blender::clamp_f(), blender::IndexRange::drop_front(), blender::Vector< T, InlineBufferCapacity, Allocator >::first(), float, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::x.
Referenced by blender::eevee::MotionBlurModule::init().
|
inline |
Definition at line 186 of file eevee_sampling.hh.
|
inline |
Definition at line 203 of file eevee_sampling.hh.
Special RNG for depth of field. Returns radius and theta angle offset to apply to the web sampling pattern.
Definition at line 386 of file eevee_sampling.cc.
|
inline |
Returns sample count inside the jittered depth of field web pattern.
Definition at line 255 of file eevee_sampling.hh.
|
inline |
Returns sample count inside the jittered depth of field web pattern.
Definition at line 263 of file eevee_sampling.hh.
| void blender::eevee::Sampling::end_sync | ( | ) |
Definition at line 131 of file eevee_sampling.cc.
References blender::BLI_time_now_seconds(), and blender::SCE_EEVEE_TAA_REPROJECTION.
Referenced by blender::eevee::Instance::end_sync().
|
inline |
Definition at line 131 of file eevee_sampling.hh.
Referenced by blender::eevee::Instance::light_bake_irradiance(), and blender::eevee::Instance::render_frame().
|
inline |
Definition at line 137 of file eevee_sampling.hh.
Referenced by blender::eevee::Instance::draw_viewport(), and blender::eevee::Instance::draw_viewport_image_render().
|
inline |
Definition at line 196 of file eevee_sampling.hh.
| void blender::eevee::Sampling::init | ( | const Object & | probe_object | ) |
Definition at line 120 of file eevee_sampling.cc.
References blender::BLI_assert(), blender::BLI_time_now_seconds(), blender::DRW_object_get_data_for_drawing(), and blender::max_ii().
| void blender::eevee::Sampling::init | ( | const Scene * | scene | ) |
Definition at line 32 of file eevee_sampling.cc.
References blender::BKE_render_preview_pixel_size(), blender::BLI_assert(), blender::BLI_time_now_seconds(), blender::SceneEEVEE::clamp_surface_direct, blender::SceneEEVEE::clamp_surface_indirect, blender::SceneEEVEE::clamp_volume_direct, blender::SceneEEVEE::clamp_volume_indirect, blender::SceneEEVEE::direct_light_intensity, blender::divide_ceil_u(), blender::Scene::eevee, blender::SceneEEVEE::flag, blender::Scene::id, blender::SceneEEVEE::indirect_light_intensity, blender::math::max(), blender::max_ii(), blender::RenderData::mode, blender::SceneEEVEE::motion_blur_steps, blender::gpu::shader::metadata::printf, blender::Scene::r, blender::R_MBLUR, blender::RNA_id_pointer_create(), blender::RNA_property_array_length(), blender::RNA_property_float_get_array(), blender::RNA_struct_find_property(), blender::SCE_EEVEE_DOF_JITTER, blender::square_i(), blender::SceneEEVEE::taa_render_samples, blender::SceneEEVEE::taa_samples, and blender::SceneEEVEE::time_limit.
Referenced by blender::eevee::Instance::init(), blender::eevee::Instance::init_light_bake(), and blender::eevee::Instance::light_bake_irradiance().
|
inline |
Definition at line 144 of file eevee_sampling.hh.
Referenced by step().
| bool blender::eevee::Sampling::is_reset | ( | ) | const |
Definition at line 327 of file eevee_sampling.cc.
References blender::BLI_assert().
| void blender::eevee::Sampling::reset | ( | ) |
Definition at line 321 of file eevee_sampling.cc.
References blender::BLI_assert().
Referenced by blender::eevee::Instance::begin_sync(), blender::eevee::Instance::end_sync(), and blender::eevee::Instance::init().
|
inline |
Definition at line 117 of file eevee_sampling.hh.
|
inline |
Definition at line 125 of file eevee_sampling.hh.
|
inline |
Definition at line 109 of file eevee_sampling.hh.
Special ball distribution: Point are distributed in a way that when they are orthogonally projected into any plane, the resulting distribution is (close to) a uniform disc distribution. rand is 3 random float in the [0..1] range. Returns point in a ball of radius 1 and centered on the origin.
Definition at line 339 of file eevee_sampling.cc.
References cosf, fmaxf, M_PI, sample, sinf, sqrtf, and blender::square_f().
|
inline |
Definition at line 150 of file eevee_sampling.hh.
Referenced by blender::eevee::Film::init(), blender::eevee::Instance::light_bake_irradiance(), and blender::eevee::Instance::render_frame().
Uniform disc distribution. rand is 2 random float in the [0..1] range. Returns point in a disk of radius 1 and centered on the origin.
Definition at line 354 of file eevee_sampling.cc.
References cosf, M_PI, sinf, and sqrtf.
Referenced by blender::eevee::Film::pixel_jitter_get().
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.
Definition at line 360 of file eevee_sampling.cc.
References cos_theta(), cosf, M_PI, blender::safe_sqrtf(), sin_theta(), sinf, and blender::square_f().
|
inline |
Definition at line 156 of file eevee_sampling.hh.
Referenced by blender::eevee::Instance::light_bake_irradiance(), and blender::eevee::Instance::render_frame().
Uniform sphere distribution. rand is 2 random float in the [0..1] range. Returns point on the sphere of radius 1 and centered on the origin.
Definition at line 368 of file eevee_sampling.cc.
References cos_theta(), cosf, M_PI, blender::safe_sqrtf(), sin_theta(), sinf, and blender::square_f().
Referenced by blender::eevee::IrradianceBake::raylists_build().
Uniform disc distribution using Fibonacci spiral sampling. rand is 2 random float in the [0..1] range. Returns point in a disk of radius 1 and centered on the origin.
Definition at line 376 of file eevee_sampling.cc.
References cosf, M_PI, sinf, and sqrtf.
Referenced by blender::eevee::Film::update_sample_table().
| void blender::eevee::Sampling::step | ( | ) |
Definition at line 180 of file eevee_sampling.cc.
References blender::BLI_assert(), blender::BLI_halton_1d(), blender::BLI_halton_2d(), blender::BLI_halton_3d(), float, blender::fractf(), blender::IndexRange::IndexRange(), interactive_mode(), blender::eevee::SAMPLING_AO_U, blender::eevee::SAMPLING_AO_V, blender::eevee::SAMPLING_AO_W, blender::eevee::SAMPLING_CLOSURE, blender::eevee::SAMPLING_CURVES_U, blender::eevee::SAMPLING_FILM_U, blender::eevee::SAMPLING_FILTER_U, blender::eevee::SAMPLING_FILTER_V, blender::eevee::SAMPLING_GBUFFER_U, blender::eevee::SAMPLING_GBUFFER_V, blender::eevee::SAMPLING_GBUFFER_W, blender::eevee::SAMPLING_LENS_U, blender::eevee::SAMPLING_LENS_V, blender::eevee::SAMPLING_LIGHTPROBE, blender::eevee::SAMPLING_PANORAMIC_U, blender::eevee::SAMPLING_PANORAMIC_V, blender::eevee::SAMPLING_RAYTRACE_U, blender::eevee::SAMPLING_RAYTRACE_V, blender::eevee::SAMPLING_RAYTRACE_W, blender::eevee::SAMPLING_RAYTRACE_X, blender::eevee::SAMPLING_SHADOW_I, blender::eevee::SAMPLING_SHADOW_J, blender::eevee::SAMPLING_SHADOW_K, blender::eevee::SAMPLING_SHADOW_U, blender::eevee::SAMPLING_SHADOW_V, blender::eevee::SAMPLING_SHADOW_W, blender::eevee::SAMPLING_SHADOW_X, blender::eevee::SAMPLING_SHADOW_Y, blender::eevee::SAMPLING_SSS_U, blender::eevee::SAMPLING_SSS_V, blender::eevee::SAMPLING_TIME, blender::eevee::SAMPLING_TRANSPARENCY, blender::eevee::SAMPLING_VOLUME_U, blender::eevee::SAMPLING_VOLUME_V, blender::eevee::SAMPLING_VOLUME_W, blender::square_i(), UNUSED_VARS_NDEBUG, and blender::x.
Referenced by blender::eevee::Instance::light_bake_irradiance().
| void blender::eevee::Sampling::update_time | ( | ) |
Definition at line 163 of file eevee_sampling.cc.
References blender::BLI_time_now_seconds().
Referenced by blender::eevee::Instance::draw_viewport_image_render(), and blender::eevee::Instance::render_frame().
|
inline |
Definition at line 171 of file eevee_sampling.hh.
Referenced by blender::eevee::DeferredLayer::do_modify_radiance().
|
inline |
Definition at line 176 of file eevee_sampling.hh.
Referenced by blender::eevee::DeferredLayer::do_modify_radiance().
|
inline |
Definition at line 166 of file eevee_sampling.hh.
|
inline |
Definition at line 181 of file eevee_sampling.hh.
Referenced by blender::eevee::DeferredLayer::do_modify_radiance().
|
inline |
Definition at line 191 of file eevee_sampling.hh.
Referenced by blender::eevee::DeferredLayer::do_modify_radiance().