|
Blender V4.3
|
#include <eevee_sampling.hh>
Public Member Functions | |
| Sampling (Instance &inst, ClampData &clamp_data) | |
| ~Sampling () | |
| void | reset () |
| bool | is_reset () const |
| 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 | do_render_sync () const |
| uint64_t | dof_ring_count_get () const |
| uint64_t | dof_sample_count_get () const |
Sampling | |
| void | init (const Scene *scene) |
| void | init (const Object &probe_object) |
| void | end_sync () |
| void | step () |
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 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 24 of file eevee_sampling.hh.
Definition at line 71 of file eevee_sampling.hh.
|
inline |
Definition at line 72 of file eevee_sampling.hh.
|
inline |
Definition at line 92 of file eevee_sampling.hh.
References SAMPLING_BUF_SLOT.
Referenced by blender::eevee::SphereProbeModule::begin_sync().
|
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 318 of file eevee_sampling.cc.
References BKE_curvemapping_evaluateF(), BLI_assert, float, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
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 335 of file eevee_sampling.cc.
References BLI_assert, 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(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::eevee::MotionBlurModule::init().
|
inline |
Definition at line 153 of file eevee_sampling.hh.
Referenced by blender::eevee::MotionBlurModule::step().
Special RNG for depth of field. Returns radius and theta angle offset to apply to the web sampling pattern.
Definition at line 277 of file eevee_sampling.cc.
Referenced by blender::eevee::DepthOfField::jitter_apply().
|
inline |
Returns sample count inside the jittered depth of field web pattern.
Definition at line 205 of file eevee_sampling.hh.
Referenced by blender::eevee::DepthOfField::sync().
|
inline |
Returns sample count inside the jittered depth of field web pattern.
Definition at line 213 of file eevee_sampling.hh.
Referenced by blender::eevee::DepthOfField::sync().
| void blender::eevee::Sampling::end_sync | ( | ) |
Definition at line 91 of file eevee_sampling.cc.
References Scene::eevee, SceneEEVEE::flag, blender::eevee::Instance::is_viewport(), blender::eevee::Instance::is_viewport_image_render(), SCE_EEVEE_TAA_REPROJECTION, and blender::eevee::Instance::scene.
|
inline |
Definition at line 122 of file eevee_sampling.hh.
Referenced by blender::eevee::MotionBlurModule::step().
|
inline |
Definition at line 128 of file eevee_sampling.hh.
Referenced by blender::eevee::ShadowModule::init(), and blender::eevee::LookdevModule::sync().
| void blender::eevee::Sampling::init | ( | const Object & | probe_object | ) |
Definition at line 82 of file eevee_sampling.cc.
References BLI_assert, Object::data, blender::eevee::Instance::is_baking(), and max_ii().
| void blender::eevee::Sampling::init | ( | const Scene * | scene | ) |
Definition at line 27 of file eevee_sampling.cc.
References BKE_render_preview_pixel_size(), BLI_assert, divide_ceil_u(), blender::eevee::Instance::is_image_render(), blender::eevee::Instance::is_viewport(), blender::math::max(), max_ii(), Scene::r, blender::eevee::sampling_web_ring_count_get(), blender::eevee::sampling_web_sample_count_get(), SCE_EEVEE_DOF_JITTER, blender::eevee::Instance::scene, square_i(), blender::eevee::ClampData::sun_threshold, blender::eevee::World::sun_threshold(), blender::eevee::ClampData::surface_direct, blender::eevee::ClampData::surface_indirect, blender::eevee::ClampData::volume_direct, blender::eevee::ClampData::volume_indirect, and blender::eevee::Instance::world.
|
inline |
Definition at line 134 of file eevee_sampling.hh.
Referenced by blender::eevee::Film::end_sync(), and step().
|
inline |
Definition at line 87 of file eevee_sampling.hh.
Referenced by blender::eevee::VolumeModule::draw_prepass(), and blender::eevee::Film::end_sync().
|
inline |
Definition at line 81 of file eevee_sampling.hh.
Referenced by blender::eevee::SphereProbeModule::end_sync(), and blender::eevee::LookdevModule::sync().
|
inline |
Definition at line 108 of file eevee_sampling.hh.
References blender::eevee::SamplingData::dimensions.
Referenced by blender::eevee::VolumeModule::draw_prepass(), blender::eevee::Film::pixel_jitter_get(), and blender::eevee::RayTraceModule::render().
|
inline |
Definition at line 116 of file eevee_sampling.hh.
References blender::eevee::SamplingData::dimensions.
|
inline |
Definition at line 100 of file eevee_sampling.hh.
References blender::eevee::SamplingData::dimensions.
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 230 of file eevee_sampling.cc.
References cosf, fmaxf, M_PI, sample, sinf, sqrtf, and square_f().
|
inline |
Definition at line 140 of file eevee_sampling.hh.
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 245 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 251 of file eevee_sampling.cc.
References cos_theta(), cosf, M_PI, safe_sqrtf(), sin_theta(), sinf, and square_f().
|
inline |
Definition at line 146 of file eevee_sampling.hh.
Referenced by blender::eevee::Film::pixel_jitter_get().
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 259 of file eevee_sampling.cc.
References cos_theta(), cosf, M_PI, safe_sqrtf(), sin_theta(), sinf, and square_f().
| void blender::eevee::Sampling::step | ( | ) |
Definition at line 122 of file eevee_sampling.cc.
References BLI_halton_2d(), BLI_halton_3d(), blender::eevee::SamplingData::dimensions, blender::eevee::Instance::film, fractf(), interactive_mode(), blender::draw::detail::StorageCommon< T, len, device_only >::push_update(), 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_FILTER_U, blender::eevee::SAMPLING_FILTER_V, blender::eevee::SAMPLING_LENS_U, blender::eevee::SAMPLING_LENS_V, blender::eevee::SAMPLING_LIGHTPROBE, 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::eevee::Film::scaling_factor_get(), and square_i().