Blender V2.61 - r43446
|
#include "kernel_compat_cpu.h"
#include "kernel_types.h"
#include "kernel_globals.h"
#include "kernel_object.h"
#include "osl_services.h"
#include "osl_shader.h"
#include "util_foreach.h"
#include <OSL/oslexec.h>
#include <oslexec_pvt.h>
Go to the source code of this file.
Defines | |
#define | TO_VEC3(v) (*(OSL::Vec3*)&(v)) |
#define | TO_COLOR3(v) (*(OSL::Color3*)&(v)) |
#define | TO_FLOAT3(v) make_float3(v[0], v[1], v[2]) |
Functions | |
CCL_NAMESPACE_BEGIN | tls_ptr (OSLGlobals::ThreadData, OSLGlobals::thread_data) |
static void | shaderdata_to_shaderglobals (KernelGlobals *kg, ShaderData *sd, int path_flag, OSL::ShaderGlobals *globals) |
static void | flatten_surface_closure_tree (ShaderData *sd, bool no_glossy, const OSL::ClosureColor *closure, float3 weight=make_float3(1.0f, 1.0f, 1.0f)) |
static float3 | flatten_background_closure_tree (const OSL::ClosureColor *closure) |
static void | flatten_volume_closure_tree (ShaderData *sd, const OSL::ClosureColor *closure, float3 weight=make_float3(1.0f, 1.0f, 1.0f)) |
#define TO_COLOR3 | ( | v | ) | (*(OSL::Color3*)&(v)) |
Definition at line 66 of file osl_shader.cpp.
#define TO_FLOAT3 | ( | v | ) | make_float3(v[0], v[1], v[2]) |
Definition at line 67 of file osl_shader.cpp.
Referenced by flatten_background_closure_tree(), flatten_surface_closure_tree(), and flatten_volume_closure_tree().
#define TO_VEC3 | ( | v | ) | (*(OSL::Vec3*)&(v)) |
Definition at line 65 of file osl_shader.cpp.
Referenced by flatten_surface_closure_tree(), and shaderdata_to_shaderglobals().
static float3 flatten_background_closure_tree | ( | const OSL::ClosureColor * | closure | ) | [static] |
Definition at line 236 of file osl_shader.cpp.
References add(), Background, make_float3(), mul(), and TO_FLOAT3.
static void flatten_surface_closure_tree | ( | ShaderData * | sd, |
bool | no_glossy, | ||
const OSL::ClosureColor * | closure, | ||
float3 | weight = make_float3(1.0f, 1.0f, 1.0f) |
||
) | [static] |
Definition at line 111 of file osl_shader.cpp.
References add(), average(), Background, ShaderData::closure, CLOSURE_BSDF_ID, CLOSURE_EMISSION_ID, CLOSURE_HOLDOUT_ID, fabsf, ShaderData::flag, ShaderData::I, MAX_CLOSURE, mul(), ShaderData::num_closure, ShaderClosure::sample_weight, SD_BSDF, SD_BSDF_GLOSSY, SD_BSDF_HAS_EVAL, SD_EMISSION, SD_HOLDOUT, TO_FLOAT3, TO_VEC3, ShaderClosure::type, Volume, and ShaderClosure::weight.
static void flatten_volume_closure_tree | ( | ShaderData * | sd, |
const OSL::ClosureColor * | closure, | ||
float3 | weight = make_float3(1.0f, 1.0f, 1.0f) |
||
) | [static] |
Definition at line 289 of file osl_shader.cpp.
References add(), average(), Background, ShaderData::closure, CLOSURE_VOLUME_ID, fabsf, MAX_CLOSURE, mul(), ShaderData::num_closure, ShaderClosure::sample_weight, TO_FLOAT3, ShaderClosure::type, Volume, and ShaderClosure::weight.
static void shaderdata_to_shaderglobals | ( | KernelGlobals * | kg, |
ShaderData * | sd, | ||
int | path_flag, | ||
OSL::ShaderGlobals * | globals | ||
) | [static] |
Definition at line 69 of file osl_shader.cpp.
References ShaderData::dI, ShaderData::dP, ShaderData::dPdu, ShaderData::dPdv, ShaderData::du, ShaderData::dv, differential::dx, differential3::dx, differential3::dy, differential::dy, ShaderData::flag, ShaderData::I, ShaderData::N, ShaderData::Ng, NULL, ShaderData::object, object_surface_area(), ShaderData::P, SD_BACKFACING, TO_VEC3, ShaderData::u, and ShaderData::v.
CCL_NAMESPACE_BEGIN tls_ptr | ( | OSLGlobals::ThreadData | , |
OSLGlobals::thread_data | |||
) |