Blender V5.3
mnee.h File Reference

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

Functions

ccl_device_inline float2 mat22_mult (const float4 a, const float2 b)
ccl_device_inline float4 mat22_mult (const float4 a, const float4 b)
ccl_device_inline float mat22_determinant (const float4 m)
ccl_device_inline float mat22_inverse (const float4 m, ccl_private float4 &m_inverse)
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)
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)
ccl_device_inline bool mnee_solve_matrix_h_to_x (const int vertex_count, ccl_private ManifoldVertex *vertices, ccl_private float2 *dx)
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)
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)
ccl_device_inline Spectrum mnee_eval_bsdf_contribution (KernelGlobals kg, ccl_private ShaderClosure *closure, const float3 wi, const float3 wo)
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)
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)
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)

Macro Definition Documentation

◆ MNEE_MAX_CAUSTIC_CASTERS

#define MNEE_MAX_CAUSTIC_CASTERS   6

◆ MNEE_MAX_INTERSECTION_COUNT

#define MNEE_MAX_INTERSECTION_COUNT   10

Definition at line 46 of file mnee.h.

Referenced by kernel_path_mnee_sample(), and mnee_newton_solver().

◆ MNEE_MAX_ITERATIONS

#define MNEE_MAX_ITERATIONS   64

Definition at line 45 of file mnee.h.

Referenced by mnee_newton_solver().

◆ MNEE_MIN_DETERMINANT

#define MNEE_MIN_DETERMINANT   0.0001f

Definition at line 52 of file mnee.h.

Referenced by mat22_inverse().

◆ MNEE_MIN_DISTANCE

#define MNEE_MIN_DISTANCE   0.001f

◆ MNEE_MIN_PROGRESS_DISTANCE

#define MNEE_MIN_PROGRESS_DISTANCE   0.0001f

Definition at line 51 of file mnee.h.

Referenced by mnee_newton_solver().

◆ MNEE_MINIMUM_STEP_SIZE

#define MNEE_MINIMUM_STEP_SIZE   0.0001f

Definition at line 48 of file mnee.h.

Referenced by mnee_newton_solver().

◆ MNEE_PROJECTION_DISTANCE_MULTIPLIER

#define MNEE_PROJECTION_DISTANCE_MULTIPLIER   2.f

Definition at line 53 of file mnee.h.

Referenced by mnee_newton_solver().

◆ MNEE_SOLVER_THRESHOLD

#define MNEE_SOLVER_THRESHOLD   0.001f

Definition at line 47 of file mnee.h.

Referenced by mnee_newton_solver().

Function Documentation

◆ kernel_path_mnee_sample()

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 )

◆ mat22_determinant()

◆ mat22_inverse()

◆ mat22_mult() [1/2]

◆ mat22_mult() [2/2]

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.

◆ mnee_compute_constraint_derivatives()

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 )

◆ mnee_compute_transfer_matrix()

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 )

◆ mnee_eval_bsdf_contribution()

◆ mnee_newton_solver()

◆ mnee_path_contribution()

◆ mnee_sample_bsdf_dh()

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 )

◆ mnee_setup_manifold_vertex()

◆ mnee_solve_matrix_h_to_x()

ccl_device_inline bool mnee_solve_matrix_h_to_x ( const int vertex_count,
ccl_private ManifoldVertex * vertices,
ccl_private float2 * dx )