|
Blender V5.0
|
#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_forceinline int 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 BsdfEval * | throughput ) |
Definition at line 948 of file mnee.h.
References ccl_device_forceinline, ccl_global, ccl_private, CLOSURE_IS_GLASS, CLOSURE_IS_REFRACTION, Ray::D, Ray::dD, differential_make_compact(), differential_zero_compact(), Ray::dP, FLT_MAX, INTEGRATOR_STATE, INTEGRATOR_STATE_WRITE, intersection_get_object_flags(), intersection_t_offset(), MicrofacetBsdf::ior, kernel_data, kernel_data_fetch, 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_DIFFUSE, PATH_RAY_TRANSMIT, path_state_rng_2D(), Intersection::prim, RaySelfPrimitives::prim, PRIMITIVE_TRIANGLE, PRNG_SURFACE_BSDF, scene_intersect(), SD_BACKFACING, SD_OBJECT_CAUSTICS_CASTER, Ray::self, shader_setup_from_ray(), SHADER_SMOOTH_NORMAL, state, surface_shader_eval(), Intersection::t, Ray::time, Ray::tmax, Ray::tmin, Intersection::type, float2::x, float2::y, and zero_float2().
Referenced by integrate_surface_direct_light().
| ccl_device_inline float mat22_determinant | ( | const float4 | m | ) |
Definition at line 103 of file mnee.h.
References ccl_device_inline, float4::w, float4::x, float4::y, and float4::z.
Referenced by 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(), MNEE_MIN_DETERMINANT, float4::w, float4::x, float4::y, and float4::z.
Referenced by 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, float4::w, float4::x, float4::y, and float4::z.
Referenced by 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, float4::w, float4::x, float4::y, and float4::z.
| ccl_device_forceinline 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 256 of file mnee.h.
References ccl_private, cross, dot(), H, len, light_sample(), make_float2, make_float4, MNEE_MIN_DISTANCE, and v.
Referenced by mnee_newton_solver().
| ccl_device_forceinline 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 671 of file mnee.h.
References ccl_device_forceinline, ccl_private, cos_theta(), cross, dot(), fabsf, fmaxf, H, len, make_float4, make_orthonormals(), mat22_determinant(), mat22_inverse(), mat22_mult(), MNEE_MAX_CAUSTIC_CASTERS, MNEE_MIN_DISTANCE, normalize, sin_from_cos(), sin_phi(), sin_theta(), and U.
Referenced by mnee_path_contribution().
| ccl_device_forceinline Spectrum mnee_eval_bsdf_contribution | ( | KernelGlobals | kg, |
| ccl_private ShaderClosure * | closure, | ||
| const float3 | wi, | ||
| const float3 | wo ) |
Definition at line 629 of file mnee.h.
References bsdf_G(), ccl_device_forceinline, ccl_private, CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID, dot(), fabsf, G, microfacet_fresnel(), normalize, and sqr.
Referenced by mnee_path_contribution().
| ccl_device_forceinline 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 411 of file mnee.h.
References beta(), ccl_device_forceinline, ccl_private, Ray::D, Ray::dD, differential_make_compact(), differential_zero_compact(), distance(), dot(), Ray::dP, 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_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_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().
| ccl_device_forceinline bool 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 BsdfEval * | throughput ) |
Definition at line 799 of file mnee.h.
References bsdf_eval_mul(), ccl_device_forceinline, ccl_private, Ray::D, Ray::dD, differential_make_compact(), differential_zero_compact(), dot(), Ray::dP, fabsf, flag, fminf, G, INTEGRATOR_STATE, INTEGRATOR_STATE_WRITE, kernel_data_fetch, RaySelfPrimitives::light_object, RaySelfPrimitives::light_prim, light_sample_shader_eval(), light_sample_update(), mnee_compute_transfer_matrix(), mnee_eval_bsdf_contribution(), MNEE_MIN_DISTANCE, normalize_len(), Intersection::object, RaySelfPrimitives::object, OBJECT_NONE, Ray::P, PATH_RAY_DIFFUSE, PATH_RAY_TRANSMIT, Intersection::prim, RaySelfPrimitives::prim, scene_intersect(), Ray::self, shader_setup_from_sample(), sqr, state, surface_shader_bsdf_eval(), surface_shader_eval(), Intersection::t, Ray::time, Ray::tmax, Ray::tmin, and v.
Referenced by kernel_path_mnee_sample().
| ccl_device_forceinline 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 584 of file mnee.h.
References atanf, ccl_device_forceinline, CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID, fast_sincosf(), logf, M_2PI_F, M_PI_2_F, M_PI_F, make_float2, safe_sqrtf(), sin_phi(), sin_theta(), and tanf.
Referenced by kernel_path_mnee_sample().
| ccl_device_forceinline 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_forceinline, ccl_private, cos_theta(), cross, dot(), kernel_data_fetch, len, make_float2, make_float4, make_orthonormals(), motion_triangle_point_from_uv(), motion_triangle_vertices_and_normals(), normalize, normalize_len(), normals, object_get_transform(), OBJECT_NONE, object_normal_transform_auto, object_position_transform_auto, PRIMITIVE_TRIANGLE, SD_OBJECT_NEGATIVE_SCALE, SD_OBJECT_TRANSFORM_APPLIED, shader_setup_object_transforms(), sin_theta(), transform_point(), triangle_vertices_and_normals(), verts, zero_float2(), and zero_float4().
Referenced by kernel_path_mnee_sample(), and mnee_newton_solver().
| ccl_device_forceinline bool mnee_solve_matrix_h_to_x | ( | const int | vertex_count, |
| ccl_private ManifoldVertex * | vertices, | ||
| ccl_private float2 * | dx ) |
Definition at line 376 of file mnee.h.
References A, C, ccl_device_forceinline, ccl_private, mat22_inverse(), mat22_mult(), and MNEE_MAX_CAUSTIC_CASTERS.
Referenced by mnee_newton_solver().