Blender V2.61 - r43446
Defines | Functions

osl_shader.cpp File Reference

#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 Documentation

#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])
#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().


Function Documentation

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]
static void flatten_volume_closure_tree ( ShaderData sd,
const OSL::ClosureColor *  closure,
float3  weight = make_float3(1.0f, 1.0f, 1.0f) 
) [static]
static void shaderdata_to_shaderglobals ( KernelGlobals *  kg,
ShaderData sd,
int  path_flag,
OSL::ShaderGlobals *  globals 
) [static]
CCL_NAMESPACE_BEGIN tls_ptr ( OSLGlobals::ThreadData  ,
OSLGlobals::thread_data   
)