|
Blender V5.3
|
#include "kernel/geom/motion_triangle.h"#include "kernel/geom/shader_data.h"#include "kernel/geom/triangle.h"#include "kernel/light/sample.h"Go to the source code of this file.
Classes | |
| struct | ManifoldVertex |
Macros | |
| #define | MNEE_MAX_ITERATIONS 64 |
| #define | MNEE_MAX_INTERSECTION_COUNT 10 |
| #define | MNEE_SOLVER_THRESHOLD 0.001f |
| #define | MNEE_MINIMUM_STEP_SIZE 0.0001f |
| #define | MNEE_MAX_CAUSTIC_CASTERS 6 |
| #define | MNEE_MIN_DISTANCE 0.001f |
| #define | MNEE_MIN_PROGRESS_DISTANCE 0.0001f |
| #define | MNEE_MIN_DETERMINANT 0.0001f |
| #define | MNEE_PROJECTION_DISTANCE_MULTIPLIER 2.f |
| #define MNEE_MAX_CAUSTIC_CASTERS 6 |
Definition at line 49 of file mnee.h.
Referenced by kernel_path_mnee_sample(), mnee_compute_transfer_matrix(), mnee_newton_solver(), and mnee_solve_matrix_h_to_x().
| #define MNEE_MAX_INTERSECTION_COUNT 10 |
Definition at line 46 of file mnee.h.
Referenced by kernel_path_mnee_sample(), and mnee_newton_solver().
| #define MNEE_MAX_ITERATIONS 64 |
Definition at line 45 of file mnee.h.
Referenced by mnee_newton_solver().
| #define MNEE_MIN_DETERMINANT 0.0001f |
Definition at line 52 of file mnee.h.
Referenced by mat22_inverse().
| #define MNEE_MIN_DISTANCE 0.001f |
Definition at line 50 of file mnee.h.
Referenced by mnee_compute_constraint_derivatives(), mnee_compute_transfer_matrix(), and mnee_path_contribution().
| #define MNEE_MIN_PROGRESS_DISTANCE 0.0001f |
Definition at line 51 of file mnee.h.
Referenced by mnee_newton_solver().
| #define MNEE_MINIMUM_STEP_SIZE 0.0001f |
Definition at line 48 of file mnee.h.
Referenced by mnee_newton_solver().
| #define MNEE_PROJECTION_DISTANCE_MULTIPLIER 2.f |
Definition at line 53 of file mnee.h.
Referenced by mnee_newton_solver().
| #define MNEE_SOLVER_THRESHOLD 0.001f |
Definition at line 47 of file mnee.h.
Referenced by mnee_newton_solver().
| ccl_device_inline ShaderEvalResult kernel_path_mnee_sample | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| ccl_private ShaderData * | sd, | ||
| ccl_private ShaderData * | sd_mnee, | ||
| const ccl_private RNGState * | rng_state, | ||
| ccl_private LightSample * | ls, | ||
| ccl_private Spectrum * | throughput, | ||
| ccl_private float3 * | r_receiver_wo, | ||
| ccl_private int & | r_vertex_count ) |
Definition at line 945 of file mnee.h.
References ccl_device_inline, ccl_global, ccl_private, CLOSURE_IS_GLASS, CLOSURE_IS_REFRACTION, Ray::D, differential_make_compact(), differential_zero_compact(), FLT_MAX, INTEGRATOR_STATE, INTEGRATOR_STATE_WRITE, intersection_get_object_flags(), intersection_t_offset(), MicrofacetBsdf::ior, kernel_data, kernel_data_fetch, kernel_path_mnee_sample(), LIGHT_AREA, RaySelfPrimitives::light_object, RaySelfPrimitives::light_prim, MNEE_MAX_CAUSTIC_CASTERS, MNEE_MAX_INTERSECTION_COUNT, mnee_newton_solver(), mnee_path_contribution(), mnee_sample_bsdf_dh(), mnee_setup_manifold_vertex(), normalize_len(), Intersection::object, RaySelfPrimitives::object, Ray::P, PATH_MNEE_VALID, PATH_RAY_FLAG_NONE, PATH_RAY_SPECTRAL, PATH_RAY_VISIBILITY_DIFFUSE, PATH_RAY_VISIBILITY_TRANSMIT, path_state_rng_2D(), Intersection::prim, RaySelfPrimitives::prim, PRIMITIVE_TRIANGLE, PRNG_SURFACE_BSDF, scene_intersect(), SD_OBJECT_CAUSTICS_CASTER, Ray::self, SHADER_EVAL_CACHE_MISS, SHADER_EVAL_EMPTY, SHADER_EVAL_OK, shader_setup_from_ray(), SHADER_SMOOTH_NORMAL, SR_BACKFACING, SR_BSDF_HAS_DISPERSION, SR_CACHE_MISS, state, surface_shader_eval(), Intersection::t, Ray::time, Ray::tmax, Ray::tmin, Intersection::type, float2::x, float2::y, and zero_float2().
Referenced by kernel_path_mnee_sample().
| ccl_device_inline float mat22_determinant | ( | const float4 | m | ) |
Definition at line 103 of file mnee.h.
References ccl_device_inline, mat22_determinant(), float4::w, float4::x, float4::y, and float4::z.
Referenced by mat22_determinant(), mat22_inverse(), and mnee_compute_transfer_matrix().
| ccl_device_inline float mat22_inverse | ( | const float4 | m, |
| ccl_private float4 & | m_inverse ) |
Definition at line 109 of file mnee.h.
References ccl_device_inline, ccl_private, fabsf, make_float4, mat22_determinant(), mat22_inverse(), MNEE_MIN_DETERMINANT, float4::w, float4::x, float4::y, and float4::z.
Referenced by mat22_inverse(), mnee_compute_transfer_matrix(), and mnee_solve_matrix_h_to_x().
| ccl_device_inline float2 mat22_mult | ( | const float4 | a, |
| const float2 | b ) |
Definition at line 90 of file mnee.h.
References b, ccl_device_inline, make_float2, mat22_mult(), float4::w, float4::x, float4::y, and float4::z.
Referenced by mat22_mult(), mat22_mult(), mnee_compute_transfer_matrix(), and mnee_solve_matrix_h_to_x().
| ccl_device_inline float4 mat22_mult | ( | const float4 | a, |
| const float4 | b ) |
Definition at line 96 of file mnee.h.
References b, ccl_device_inline, make_float4, mat22_mult(), float4::w, float4::x, float4::y, and float4::z.
| ccl_device_inline bool mnee_compute_constraint_derivatives | ( | const int | vertex_count, |
| ccl_private ManifoldVertex * | vertices, | ||
| const ccl_private float3 & | surface_sample_pos, | ||
| const bool | light_fixed_direction, | ||
| const float3 | light_sample ) |
Definition at line 249 of file mnee.h.
References ccl_private, cross, dot(), H, len(), light_sample(), make_float2, make_float4, mnee_compute_constraint_derivatives(), and MNEE_MIN_DISTANCE.
Referenced by mnee_compute_constraint_derivatives(), and mnee_newton_solver().
| ccl_device_inline bool mnee_compute_transfer_matrix | ( | const ccl_private ShaderData * | sd, |
| const ccl_private LightSample * | ls, | ||
| const bool | light_fixed_direction, | ||
| const int | vertex_count, | ||
| ccl_private ManifoldVertex * | vertices, | ||
| ccl_private float * | dx1_dxlight, | ||
| ccl_private float * | dh_dx ) |
Definition at line 661 of file mnee.h.
References ccl_device_inline, ccl_private, cos_theta(), cross, dot(), fabsf, fmaxf, H, len(), make_float4, make_orthonormals(), mat22_determinant(), mat22_inverse(), mat22_mult(), mnee_compute_transfer_matrix(), MNEE_MAX_CAUSTIC_CASTERS, MNEE_MIN_DISTANCE, normalize, sin_from_cos(), sin_phi(), sin_theta(), and U.
Referenced by mnee_compute_transfer_matrix(), and mnee_path_contribution().
| ccl_device_inline Spectrum mnee_eval_bsdf_contribution | ( | KernelGlobals | kg, |
| ccl_private ShaderClosure * | closure, | ||
| const float3 | wi, | ||
| const float3 | wo ) |
Definition at line 621 of file mnee.h.
References bsdf_G(), ccl_device_inline, ccl_private, CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID, dot(), fabsf, G, microfacet_fresnel(), mnee_eval_bsdf_contribution(), normalize, sqr, and FresnelCoeff::transmittance.
Referenced by mnee_eval_bsdf_contribution(), and mnee_path_contribution().
| ccl_device_inline bool mnee_newton_solver | ( | KernelGlobals | kg, |
| const ccl_private ShaderData * | sd, | ||
| ccl_private ShaderData * | sd_vtx, | ||
| const ccl_private LightSample * | ls, | ||
| const bool | light_fixed_direction, | ||
| const int | vertex_count, | ||
| ccl_private ManifoldVertex * | vertices ) |
Definition at line 403 of file mnee.h.
References beta(), ccl_device_inline, ccl_private, Ray::D, differential_make_compact(), differential_zero_compact(), distance(), dot(), fmaxf, intersection_t_offset(), len(), RaySelfPrimitives::light_object, RaySelfPrimitives::light_prim, light_sample(), min, mnee_compute_constraint_derivatives(), MNEE_MAX_CAUSTIC_CASTERS, MNEE_MAX_INTERSECTION_COUNT, MNEE_MAX_ITERATIONS, MNEE_MIN_PROGRESS_DISTANCE, MNEE_MINIMUM_STEP_SIZE, mnee_newton_solver(), MNEE_PROJECTION_DISTANCE_MULTIPLIER, mnee_setup_manifold_vertex(), mnee_solve_matrix_h_to_x(), MNEE_SOLVER_THRESHOLD, normalize_len(), Intersection::object, RaySelfPrimitives::object, OBJECT_NONE, Ray::P, ManifoldVertex::p, PATH_RAY_VISIBILITY_TRANSMIT, Intersection::prim, RaySelfPrimitives::prim, PRIM_NONE, scene_intersect(), Ray::self, Intersection::t, Ray::time, Ray::tmax, Ray::tmin, float2::x, and float2::y.
Referenced by kernel_path_mnee_sample(), and mnee_newton_solver().
| ccl_device_inline ShaderEvalResult mnee_path_contribution | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| ccl_private ShaderData * | sd, | ||
| ccl_private ShaderData * | sd_mnee, | ||
| ccl_private LightSample * | ls, | ||
| const bool | light_fixed_direction, | ||
| const int | vertex_count, | ||
| ccl_private ManifoldVertex * | vertices, | ||
| ccl_private Spectrum * | throughput, | ||
| ccl_private float3 * | r_receiver_wo ) |
Definition at line 789 of file mnee.h.
References ccl_device_inline, ccl_private, Ray::D, differential_make_compact(), differential_zero_compact(), dot(), fabsf, fminf, G, INTEGRATOR_STATE, INTEGRATOR_STATE_WRITE, kernel_data_fetch, RaySelfPrimitives::light_object, RaySelfPrimitives::light_prim, light_sample_update(), mnee_compute_transfer_matrix(), mnee_eval_bsdf_contribution(), MNEE_MIN_DISTANCE, mnee_path_contribution(), normalize_len(), Intersection::object, RaySelfPrimitives::object, OBJECT_NONE, one_spectrum, Ray::P, PATH_RAY_FLAG_NONE, PATH_RAY_VISIBILITY_DIFFUSE, PATH_RAY_VISIBILITY_TRANSMIT, Intersection::prim, RaySelfPrimitives::prim, scene_intersect(), Ray::self, SHADER_EVAL_CACHE_MISS, SHADER_EVAL_EMPTY, SHADER_EVAL_OK, shader_setup_from_sample(), sqr, SR_CACHE_MISS, state, surface_shader_eval(), Intersection::t, Ray::time, Ray::tmax, and Ray::tmin.
Referenced by kernel_path_mnee_sample(), and mnee_path_contribution().
| ccl_device_inline float2 mnee_sample_bsdf_dh | ( | ClosureType | type, |
| const float | alpha_x, | ||
| const float | alpha_y, | ||
| const float | sample_u, | ||
| const float | sample_v ) |
Definition at line 576 of file mnee.h.
References atanf, ccl_device_inline, CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID, fast_sincosf(), logf, M_2PI_F, M_PI_2_F, M_PI_F, make_float2, mnee_sample_bsdf_dh(), safe_sqrtf(), sin_phi(), sin_theta(), and tanf.
Referenced by kernel_path_mnee_sample(), and mnee_sample_bsdf_dh().
| ccl_device_inline void mnee_setup_manifold_vertex | ( | KernelGlobals | kg, |
| ccl_private ManifoldVertex * | vtx, | ||
| ccl_private ShaderClosure * | bsdf, | ||
| const float | eta, | ||
| const float2 | n_offset, | ||
| const ccl_private Ray * | ray, | ||
| const ccl_private Intersection * | isect, | ||
| ccl_private ShaderData * | sd_vtx ) |
Definition at line 120 of file mnee.h.
References ccl_device_inline, ccl_private, cos_theta(), cross, dot(), kernel_data_fetch, len(), make_float2, make_float4, make_orthonormals(), mnee_setup_manifold_vertex(), motion_triangle_vertices_and_normals(), normalize, normalize_len(), OBJECT_NONE, object_normal_transform(), object_position_transform(), PRIMITIVE_TRIANGLE, SD_OBJECT_NEGATIVE_SCALE, SD_OBJECT_TRANSFORM_APPLIED, shader_setup_object_transforms(), sin_theta(), triangle_point_from_uv_and_verts(), triangle_vertices_and_normals(), zero_float2(), and zero_float4().
Referenced by kernel_path_mnee_sample(), mnee_newton_solver(), and mnee_setup_manifold_vertex().
| ccl_device_inline bool mnee_solve_matrix_h_to_x | ( | const int | vertex_count, |
| ccl_private ManifoldVertex * | vertices, | ||
| ccl_private float2 * | dx ) |
Definition at line 368 of file mnee.h.
References A, C, ccl_device_inline, ccl_private, mat22_inverse(), mat22_mult(), MNEE_MAX_CAUSTIC_CASTERS, and mnee_solve_matrix_h_to_x().
Referenced by mnee_newton_solver(), and mnee_solve_matrix_h_to_x().