|
Blender V5.3
|
Classes | |
| struct | SampleInput |
| struct | SampleOutput |
| struct | Tiles |
| struct | Setup |
| struct | Constants |
| struct | Scan |
| struct | Resolve |
Functions | |
| uint | angles_to_bitmask (float2 theta) |
| float | bitmask_to_visibility_uniform (uint bitmask) |
| float | bitmask_to_occlusion_uniform (uint bitmask) |
| float | bitmask_to_occlusion_cosine (uint bitmask) |
| void | projected_normal_to_plane_angle_and_length (float3 N, float3 V, float3 T, float3 B, float &N_proj_len, float &N_angle) |
Buffer Sampling implementation | |
| template<typename T> | |
| float3 | sample_radiance (sampler2D, float2, float) |
| template<typename T> | |
| float3 | sample_normal (sampler2D, float2, float) |
| template<typename T> | |
| T | select_result (float, SphericalHarmonicL1< float4 >) |
| template float3 | sample_radiance< float > (sampler2D screen_radiance_tx, float2 uv, float lod) |
| template float3 | sample_normal< float > (sampler2D screen_normal_tx, float2 uv, float lod) |
| template<> | |
| float | select_result< float > (float occlusion, SphericalHarmonicL1< float4 >) |
| template<> | |
| float3 | sample_radiance< SphericalHarmonicL1< float4 > > (sampler2D screen_radiance_tx, float2 uv, float lod) |
| template<> | |
| float3 | sample_normal< SphericalHarmonicL1< float4 > > (sampler2D screen_normal_tx, float2 uv, float lod) |
| template<> | |
| SphericalHarmonicL1< float4 > | select_result< SphericalHarmonicL1< float4 > > (float, SphericalHarmonicL1< float4 > sh) |
Fast GI scan implementation | |
| template<typename ResultT> | |
| ResultT | eval (const Uniform &uni, const ViewMatrices view, ScreenThicknessParameters thickness_params, sampler2D hiz_tx, sampler2D screen_radiance_tx, sampler2D screen_normal_tx, float3 vP, float3 vN, float4 noise, float2 pixel_size, float search_distance, float angle_bias, const int slice_count, const int sample_count, const bool reversed, const bool ao_only) |
| template float | eval< float > (const Uniform &, const ViewMatrices, ScreenThicknessParameters, sampler2D, sampler2D, sampler2D, float3, float3, float4, float2, float, float, int, int, bool, bool) |
| template SphericalHarmonicL1< float4 > | eval< SphericalHarmonicL1< float4 > > (const Uniform &, const ViewMatrices, ScreenThicknessParameters, sampler2D, sampler2D, sampler2D, float3, float3, float4, float2, float, float, int, int, bool, bool) |
Setup Stage | |
| void | setup (const uint3 global_id, const uint3 local_id, const gbuffer::Reader &reader, const Uniform &uni, const draw::View &views, Setup &srt) |
Scan Stage | |
| void | scan (const uint3 group_id, const uint3 local_id, Scan &srt, const Tiles &tiles, const Sampling &sampling, const UtilityTexture &util_tx, const HiZ &hiz, const gbuffer::Reader &reader, const Uniform &uni, const draw::View &views, SampleOutput &sh_out, Constants &constants) |
Denoise | |
| void | denoise (const uint3 group_id, const uint3 local_id, SampleInput &sh_in, SampleOutput &sh_out, const HiZ &hiz, const Uniform &uni, const draw::View &views, Tiles &tiles) |
Resolve | |
| void | resolve (const uint3 group_id, const uint3 local_id, const Tiles &tiles, const SampleInput &sh_in, Resolve &srt, const gbuffer::Reader &reader, const Uniform &uni, const draw::View &views, const LightprobeRenderData &lightprobes) |
| uint eevee::fast_gi::angles_to_bitmask | ( | float2 | theta | ) |
Returns the bitmask for a given ordered pair of angle in [-pi/2..pi/2] range. Clamps the inputs to the valid range.
Definition at line 43 of file eevee_fast_gi.bsl.hh.
References angles_to_bitmask(), b, ceil, floor, M_1_PI, saturate, float2::x, and float2::y.
Referenced by angles_to_bitmask(), eevee_test_fast_gi_main(), and eval().
| float eevee::fast_gi::bitmask_to_occlusion_cosine | ( | uint | bitmask | ) |
For a given visibility bitmask storing locally occluded sectors, returns the cosine weighted occlusion (visibility).
Definition at line 76 of file eevee_fast_gi.bsl.hh.
References angle(), bitCount, bitmask_to_occlusion_cosine(), cos, dot(), float, M_PI, M_PI_2, and saturate.
Referenced by bitmask_to_occlusion_cosine(), eevee_test_fast_gi_main(), and eval().
| float eevee::fast_gi::bitmask_to_occlusion_uniform | ( | uint | bitmask | ) |
For a given visibility bitmask storing locally occluded sectors, returns the uniform (non-cosine weighted) occlusion (visibility).
Definition at line 66 of file eevee_fast_gi.bsl.hh.
References bitmask_to_occlusion_uniform(), and bitmask_to_visibility_uniform().
Referenced by bitmask_to_occlusion_uniform(), and eevee_test_fast_gi_main().
| float eevee::fast_gi::bitmask_to_visibility_uniform | ( | uint | bitmask | ) |
Definition at line 55 of file eevee_fast_gi.bsl.hh.
References bitCount, bitmask_to_visibility_uniform(), and float.
Referenced by bitmask_to_occlusion_uniform(), bitmask_to_visibility_uniform(), and eval().
| void eevee::fast_gi::denoise | ( | const uint3 | group_id, |
| const uint3 | local_id, | ||
| SampleInput & | sh_in, | ||
| SampleOutput & | sh_out, | ||
| const HiZ & | hiz, | ||
| const Uniform & | uni, | ||
| const draw::View & | views, | ||
| Tiles & | tiles ) |
Definition at line 824 of file eevee_fast_gi.bsl.hh.
References denoise(), imageStore(), local_invocation_id, spherical_harmonics::madd(), spherical_harmonics::mul(), resource_table, safe_rcp(), texelFetch(), textureSize(), tiles, unpackUvec2x16(), work_group_id, x, and y.
Referenced by denoise().
| ResultT eevee::fast_gi::eval | ( | const Uniform & | uni, |
| const ViewMatrices | view, | ||
| ScreenThicknessParameters | thickness_params, | ||
| sampler2D | hiz_tx, | ||
| sampler2D | screen_radiance_tx, | ||
| sampler2D | screen_normal_tx, | ||
| float3 | vP, | ||
| float3 | vN, | ||
| float4 | noise, | ||
| float2 | pixel_size, | ||
| float | search_distance, | ||
| float | angle_bias, | ||
| const int | slice_count, | ||
| const int | sample_count, | ||
| const bool | reversed, | ||
| const bool | ao_only ) |
Scans the horizon in many directions and returns the indirect lighting radiance. Returned lighting is stored inside the context in _accum members already normalized. If reversed is set to true, the input normal must be negated.
Definition at line 178 of file eevee_fast_gi.bsl.hh.
References abs, acos_fast(), angles_to_bitmask(), bitmask_to_occlusion_cosine(), bitmask_to_visibility_uniform(), clamp(), cos, ScreenSpaceRay::create(), cross, ViewMatrices::depth_screen_to_view(), Ray::direction, ScreenSpaceRay::direction, dot(), SphericalHarmonicL1< T >::encode_signal_sample(), eval(), floor, ScreenThicknessEstimator::init(), length_squared(), log2, M_PI, M_PI_2, M_TAU, spherical_harmonics::madd(), max, Ray::max_time, ScreenSpaceRay::max_time, spherical_harmonics::mul(), noise(), normalize, Ray::origin, ScreenSpaceRay::origin, orthogonal(), ViewMatrices::point_screen_to_view(), projected_normal_to_plane_angle_and_length(), eevee::Uniform::raytrace_buf, safe_rcp(), sample_circle(), sample_normal(), sample_radiance(), saturate, select_result(), sqrt_fast(), square(), textureLod(), ScreenThicknessEstimator::thickness(), eevee::Uniform::uniform_buf, ViewMatrices::view_incident_vector(), float2::x, float2::y, float3::z, and packed_float3::z.
Referenced by eval(), eval< float >(), eval< SphericalHarmonicL1< float4 > >(), and scan().
| template float eevee::fast_gi::eval< float > | ( | const Uniform & | , |
| const ViewMatrices | , | ||
| ScreenThicknessParameters | , | ||
| sampler2D | , | ||
| sampler2D | , | ||
| sampler2D | , | ||
| float3 | , | ||
| float3 | , | ||
| float4 | , | ||
| float2 | , | ||
| float | , | ||
| float | , | ||
| int | , | ||
| int | , | ||
| bool | , | ||
| bool | ) |
References eval().
Referenced by ambient_occlusion_eval(), and eevee::occlusion_pass().
| template SphericalHarmonicL1< float4 > eevee::fast_gi::eval< SphericalHarmonicL1< float4 > > | ( | const Uniform & | , |
| const ViewMatrices | , | ||
| ScreenThicknessParameters | , | ||
| sampler2D | , | ||
| sampler2D | , | ||
| sampler2D | , | ||
| float3 | , | ||
| float3 | , | ||
| float4 | , | ||
| float2 | , | ||
| float | , | ||
| float | , | ||
| int | , | ||
| int | , | ||
| bool | , | ||
| bool | ) |
| void eevee::fast_gi::projected_normal_to_plane_angle_and_length | ( | float3 | N, |
| float3 | V, | ||
| float3 | T, | ||
| float3 | B, | ||
| float & | N_proj_len, | ||
| float & | N_angle ) |
Projects the normal N onto a plane defined by V and T. V, T, B forms an orthonormal basis around V. Returns the angle of the normal projected normal with V and its length.
Definition at line 107 of file eevee_fast_gi.bsl.hh.
References acos_fast(), B, dot(), N, normalize_and_get_length(), projected_normal_to_plane_angle_and_length(), sign(), T, and V.
Referenced by eval(), and projected_normal_to_plane_angle_and_length().
| void eevee::fast_gi::resolve | ( | const uint3 | group_id, |
| const uint3 | local_id, | ||
| const Tiles & | tiles, | ||
| const SampleInput & | sh_in, | ||
| Resolve & | srt, | ||
| const gbuffer::Reader & | reader, | ||
| const Uniform & | uni, | ||
| const draw::View & | views, | ||
| const LightprobeRenderData & | lightprobes ) |
Definition at line 894 of file eevee_fast_gi.bsl.hh.
References any(), gbuffer::Header::bin_index_per_layer(), bxdf_lightprobe_ray(), spherical_harmonics::clamp_energy(), closure_apparent_roughness_get(), gbuffer::Header::closure_len(), LightProbeRay::dominant_direction, SphericalHarmonicL1< T >::evaluate_lambert(), greaterThanEqual, gbuffer::Layers::header, imageLoad(), imageStore(), interp(), gbuffer::Header::is_empty(), L, gbuffer::Layers::layer, local_invocation_id, spherical_harmonics::madd(), max, mix, spherical_harmonics::mul(), P, ViewMatrices::point_screen_to_world(), reverse_z::read(), reduce_add(), resolve(), resource_table, spherical_harmonics::rotate(), safe_rcp(), saturate, gbuffer::Layers::surface_N(), texelFetch(), textureSize(), tiles, unpackUvec2x16(), unroll, V, ViewMatrices::viewinv, eevee::LightProbeSample::volume_irradiance, float4::w, work_group_id, ViewMatrices::world_incident_vector(), float4::x, float4::y, and float4::z.
Referenced by resolve().
Definition at line 129 of file eevee_fast_gi.bsl.hh.
References sample_normal().
Referenced by eval(), sample_normal(), sample_normal< float >(), and sample_normal< SphericalHarmonicL1< float4 > >().
| template float3 eevee::fast_gi::sample_normal< float > | ( | sampler2D | screen_normal_tx, |
| float2 | uv, | ||
| float | lod ) |
References sample_normal().
| float3 eevee::fast_gi::sample_normal< SphericalHarmonicL1< float4 > > | ( | sampler2D | screen_normal_tx, |
| float2 | uv, | ||
| float | lod ) |
Definition at line 155 of file eevee_fast_gi.bsl.hh.
References sample_normal(), and textureLod().
Definition at line 124 of file eevee_fast_gi.bsl.hh.
References sample_radiance().
Referenced by eval(), sample_radiance(), sample_radiance< float >(), and sample_radiance< SphericalHarmonicL1< float4 > >().
| template float3 eevee::fast_gi::sample_radiance< float > | ( | sampler2D | screen_radiance_tx, |
| float2 | uv, | ||
| float | lod ) |
References sample_radiance().
| float3 eevee::fast_gi::sample_radiance< SphericalHarmonicL1< float4 > > | ( | sampler2D | screen_radiance_tx, |
| float2 | uv, | ||
| float | lod ) |
Definition at line 148 of file eevee_fast_gi.bsl.hh.
References sample_radiance(), and textureLod().
| void eevee::fast_gi::scan | ( | const uint3 | group_id, |
| const uint3 | local_id, | ||
| Scan & | srt, | ||
| const Tiles & | tiles, | ||
| const Sampling & | sampling, | ||
| const UtilityTexture & | util_tx, | ||
| const HiZ & | hiz, | ||
| const gbuffer::Reader & | reader, | ||
| const Uniform & | uni, | ||
| const draw::View & | views, | ||
| SampleOutput & | sh_out, | ||
| Constants & | constants ) |
Definition at line 747 of file eevee_fast_gi.bsl.hh.
References eval(), fract(), imageStore(), local_invocation_id, min, noise(), ViewMatrices::point_screen_to_view(), resource_table, scan(), texelFetch(), textureSize(), tiles, unpackUvec2x16(), UTIL_BLUE_NOISE_LAYER, and work_group_id.
Referenced by scan().
| T eevee::fast_gi::select_result | ( | float | , |
| SphericalHarmonicL1< float4 > | ) |
Definition at line 133 of file eevee_fast_gi.bsl.hh.
References select_result(), and T.
Referenced by eval(), select_result(), and select_result< float >().
| float eevee::fast_gi::select_result< float > | ( | float | occlusion, |
| SphericalHarmonicL1< float4 > | ) |
Definition at line 141 of file eevee_fast_gi.bsl.hh.
References select_result().
| SphericalHarmonicL1< float4 > eevee::fast_gi::select_result< SphericalHarmonicL1< float4 > > | ( | float | , |
| SphericalHarmonicL1< float4 > | sh ) |
Definition at line 155 of file eevee_fast_gi.bsl.hh.
| void eevee::fast_gi::setup | ( | const uint3 | global_id, |
| const uint3 | local_id, | ||
| const gbuffer::Reader & | reader, | ||
| const Uniform & | uni, | ||
| const draw::View & | views, | ||
| Setup & | srt ) |
Definition at line 586 of file eevee_fast_gi.bsl.hh.
References all(), barrier(), colorspace::brightness_clamp_max(), equal, global_invocation_id, gbuffer::Layers::header, imageStoreFast, gbuffer::Header::is_empty(), local_invocation_id, min, ViewMatrices::ndc_to_screen(), P, ViewMatrices::point_screen_to_world(), project_point(), reverse_z::read(), resource_table, setup(), gbuffer::Layers::surface_N(), texelFetch(), textureLod(), and textureSize().
Referenced by setup().