Blender V2.61 - r43446
|
#include "svm/bsdf.h"
#include "svm/emissive.h"
#include "svm/volume.h"
#include "svm/svm_bsdf.h"
#include "svm/svm.h"
Go to the source code of this file.
Functions | |
CCL_NAMESPACE_BEGIN __device_inline void | shader_setup_from_ray (KernelGlobals *kg, ShaderData *sd, const Intersection *isect, const Ray *ray) |
__device void | shader_setup_from_sample (KernelGlobals *kg, ShaderData *sd, const float3 P, const float3 Ng, const float3 I, int shader, int object, int prim, float u, float v) |
__device void | shader_setup_from_displace (KernelGlobals *kg, ShaderData *sd, int object, int prim, float u, float v) |
__device_inline void | shader_setup_from_background (KernelGlobals *kg, ShaderData *sd, const Ray *ray) |
__device float3 | shader_bsdf_eval (KernelGlobals *kg, const ShaderData *sd, const float3 omega_in, float *pdf) |
__device int | shader_bsdf_sample (KernelGlobals *kg, const ShaderData *sd, float randu, float randv, float3 *eval, float3 *omega_in, differential3 *domega_in, float *pdf) |
__device void | shader_bsdf_blur (KernelGlobals *kg, ShaderData *sd, float roughness) |
__device float3 | shader_bsdf_transparency (KernelGlobals *kg, ShaderData *sd) |
__device float3 | shader_emissive_eval (KernelGlobals *kg, ShaderData *sd) |
__device float3 | shader_holdout_eval (KernelGlobals *kg, ShaderData *sd) |
__device void | shader_eval_surface (KernelGlobals *kg, ShaderData *sd, float randb, int path_flag) |
__device float3 | shader_eval_background (KernelGlobals *kg, ShaderData *sd, int path_flag) |
__device float3 | shader_volume_eval_phase (KernelGlobals *kg, ShaderData *sd, float3 omega_in, float3 omega_out) |
__device void | shader_eval_volume (KernelGlobals *kg, ShaderData *sd, float randb, int path_flag) |
__device void | shader_eval_displacement (KernelGlobals *kg, ShaderData *sd) |
__device void | shader_release (KernelGlobals *kg, ShaderData *sd) |
__device void shader_bsdf_blur | ( | KernelGlobals * | kg, |
ShaderData * | sd, | ||
float | roughness | ||
) |
Definition at line 387 of file kernel_shader.h.
References ShaderData::closure, CLOSURE_IS_BSDF, i, ShaderData::num_closure, svm_bsdf_blur(), and ShaderClosure::type.
__device float3 shader_bsdf_eval | ( | KernelGlobals * | kg, |
const ShaderData * | sd, | ||
const float3 | omega_in, | ||
float * | |||
) |
Definition at line 310 of file kernel_shader.h.
References ShaderData::closure, make_float3(), svm_bsdf_eval(), and ShaderClosure::weight.
Referenced by direct_emission().
__device int shader_bsdf_sample | ( | KernelGlobals * | kg, |
const ShaderData * | sd, | ||
float | randu, | ||
float | randv, | ||
float3 * | eval, | ||
float3 * | omega_in, | ||
differential3 * | domega_in, | ||
float * | |||
) |
Definition at line 322 of file kernel_shader.h.
References ShaderData::closure, CLOSURE_IS_BSDF, label(), LABEL_NONE, ShaderData::num_closure, ShaderData::randb_closure, ShaderClosure::sample_weight, sum(), svm_bsdf_sample(), ShaderClosure::type, and ShaderClosure::weight.
Referenced by kernel_path_integrate().
__device float3 shader_bsdf_transparency | ( | KernelGlobals * | kg, |
ShaderData * | sd | ||
) |
Definition at line 403 of file kernel_shader.h.
References ShaderData::closure, CLOSURE_BSDF_TRANSPARENT_ID, i, make_float3(), ShaderData::num_closure, ShaderClosure::type, and ShaderClosure::weight.
Referenced by shadow_blocked().
__device float3 shader_emissive_eval | ( | KernelGlobals * | kg, |
ShaderData * | sd | ||
) |
Definition at line 427 of file kernel_shader.h.
References ShaderData::closure, CLOSURE_IS_EMISSION, emissive_eval(), i, make_float3(), ShaderData::num_closure, svm_emissive_eval(), ShaderClosure::type, and ShaderClosure::weight.
Referenced by direct_emissive_eval(), and indirect_emission().
__device float3 shader_eval_background | ( | KernelGlobals * | kg, |
ShaderData * | sd, | ||
int | path_flag | ||
) |
Definition at line 495 of file kernel_shader.h.
References ShaderData::closure, CLOSURE_BACKGROUND_ID, CLOSURE_IS_BACKGROUND, i, make_float3(), ShaderData::num_closure, SHADER_TYPE_SURFACE, svm_eval_nodes(), ShaderClosure::type, and ShaderClosure::weight.
Referenced by kernel_path_integrate(), and kernel_shader_evaluate().
__device void shader_eval_displacement | ( | KernelGlobals * | kg, |
ShaderData * | sd | ||
) |
Definition at line 571 of file kernel_shader.h.
References SHADER_TYPE_DISPLACEMENT, and svm_eval_nodes().
Referenced by kernel_shader_evaluate().
__device void shader_eval_surface | ( | KernelGlobals * | kg, |
ShaderData * | sd, | ||
float | randb, | ||
int | path_flag | ||
) |
Definition at line 476 of file kernel_shader.h.
References bsdf_diffuse_setup(), ShaderData::closure, make_float3(), SHADER_TYPE_SURFACE, svm_eval_nodes(), and ShaderClosure::weight.
Referenced by direct_emissive_eval(), kernel_path_integrate(), and shadow_blocked().
__device void shader_eval_volume | ( | KernelGlobals * | kg, |
ShaderData * | sd, | ||
float | randb, | ||
int | path_flag | ||
) |
Definition at line 557 of file kernel_shader.h.
References SHADER_TYPE_VOLUME, and svm_eval_nodes().
__device float3 shader_holdout_eval | ( | KernelGlobals * | kg, |
ShaderData * | sd | ||
) |
Definition at line 453 of file kernel_shader.h.
References ShaderData::closure, CLOSURE_HOLDOUT_ID, CLOSURE_IS_HOLDOUT, i, make_float3(), ShaderData::num_closure, ShaderClosure::type, and ShaderClosure::weight.
Referenced by kernel_path_integrate().
__device void shader_release | ( | KernelGlobals * | kg, |
ShaderData * | sd | ||
) |
Definition at line 599 of file kernel_shader.h.
Referenced by direct_emissive_eval(), and kernel_path_integrate().
__device_inline void shader_setup_from_background | ( | KernelGlobals * | kg, |
ShaderData * | sd, | ||
const Ray * | ray | ||
) |
Definition at line 238 of file kernel_shader.h.
References Ray::D, Ray::dD, ShaderData::dI, differential_incoming(), ShaderData::dP, ShaderData::dPdu, ShaderData::dPdv, ShaderData::du, ShaderData::dv, differential::dx, differential::dy, ShaderData::flag, ShaderData::I, kernel_data, kernel_tex_fetch, make_float3(), ShaderData::N, ShaderData::Ng, ShaderData::object, ShaderData::P, ShaderData::prim, ShaderData::shader, SHADER_MASK, ShaderData::u, and ShaderData::v.
Referenced by kernel_path_integrate(), and kernel_shader_evaluate().
__device void shader_setup_from_displace | ( | KernelGlobals * | kg, |
ShaderData * | sd, | ||
int | object, | ||
int | prim, | ||
float | u, | ||
float | v | ||
) |
Definition at line 219 of file kernel_shader.h.
References I, make_float3(), P(), shader_setup_from_sample(), SHADER_SMOOTH_NORMAL, triangle_normal_MT(), and triangle_point_MT().
Referenced by kernel_shader_evaluate().
CCL_NAMESPACE_BEGIN __device_inline void shader_setup_from_ray | ( | KernelGlobals * | kg, |
ShaderData * | sd, | ||
const Intersection * | isect, | ||
const Ray * | ray | ||
) |
Definition at line 48 of file kernel_shader.h.
References __float_as_int(), bvh_triangle_refine(), Ray::D, Ray::dD, ShaderData::dI, differential_dudv(), differential_incoming(), differential_transfer(), dot(), ShaderData::dP, Ray::dP, ShaderData::dPdu, ShaderData::dPdv, ShaderData::du, ShaderData::dv, ShaderData::flag, ShaderData::I, kernel_tex_fetch, make_float3(), ShaderData::N, ShaderData::Ng, Intersection::object, ShaderData::object, object_dir_transform(), object_normal_transform(), ShaderData::P, Intersection::prim, ShaderData::prim, SD_BACKFACING, ShaderData::shader, SHADER_MASK, SHADER_SMOOTH_NORMAL, Intersection::t, triangle_dPdudv(), triangle_smooth_normal(), Intersection::u, ShaderData::u, Intersection::v, ShaderData::v, float4::w, float4::x, float4::y, and float4::z.
Referenced by kernel_path_integrate(), and shadow_blocked().
__device void shader_setup_from_sample | ( | KernelGlobals * | kg, |
ShaderData * | sd, | ||
const float3 | P, | ||
const float3 | Ng, | ||
const float3 | I, | ||
int | shader, | ||
int | object, | ||
int | prim, | ||
float | u, | ||
float | v | ||
) |
Definition at line 124 of file kernel_shader.h.
References ShaderData::dI, dot(), ShaderData::dP, ShaderData::dPdu, ShaderData::dPdv, ShaderData::du, ShaderData::dv, differential::dx, differential3::dx, differential3::dy, differential::dy, ShaderData::flag, ShaderData::I, I, kernel_tex_fetch, make_float3(), ShaderData::N, ShaderData::Ng, ShaderData::object, object_dir_transform(), object_normal_transform(), P(), ShaderData::P, ShaderData::prim, SD_BACKFACING, ShaderData::shader, SHADER_MASK, SHADER_SMOOTH_NORMAL, triangle_dPdudv(), triangle_smooth_normal(), ShaderData::u, and ShaderData::v.
Referenced by direct_emissive_eval(), and shader_setup_from_displace().
__device float3 shader_volume_eval_phase | ( | KernelGlobals * | kg, |
ShaderData * | sd, | ||
float3 | omega_in, | ||
float3 | omega_out | ||
) |
Definition at line 531 of file kernel_shader.h.
References ShaderData::closure, CLOSURE_IS_VOLUME, i, make_float3(), ShaderData::num_closure, ShaderClosure::type, and volume_eval_phase().