Blender  V2.93
Functions
osl_services.cpp File Reference
#include <string.h>
#include "render/colorspace.h"
#include "render/mesh.h"
#include "render/object.h"
#include "render/scene.h"
#include "kernel/osl/osl_closures.h"
#include "kernel/osl/osl_globals.h"
#include "kernel/osl/osl_services.h"
#include "kernel/osl/osl_shader.h"
#include "util/util_foreach.h"
#include "util/util_logging.h"
#include "util/util_string.h"
#include "kernel/kernel_compat_cpu.h"
#include "kernel/split/kernel_split_data_types.h"
#include "kernel/kernel_globals.h"
#include "kernel/kernel_color.h"
#include "kernel/kernel_random.h"
#include "kernel/kernel_write_passes.h"
#include "kernel/kernel_projection.h"
#include "kernel/kernel_differential.h"
#include "kernel/kernel_montecarlo.h"
#include "kernel/kernel_camera.h"
#include "kernel/kernels/cpu/kernel_cpu_image.h"
#include "kernel/geom/geom.h"
#include "kernel/bvh/bvh.h"
#include "kernel/kernel_accumulate.h"
#include "kernel/kernel_shader.h"

Go to the source code of this file.

Functions

static CCL_NAMESPACE_BEGIN void copy_matrix (OSL::Matrix44 &m, const Transform &tfm)
 
static void copy_matrix (OSL::Matrix44 &m, const ProjectionTransform &tfm)
 
static bool set_attribute_float2 (float2 f[3], TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float2 (float2 f, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float3 (float3 f[3], TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float3 (float3 f, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float4 (float4 f[3], TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float4 (float4 f, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float (float f[3], TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float (float f, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_int (int i, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_string (ustring str, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float3_3 (float3 P[3], TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_matrix (const Transform &tfm, TypeDesc type, void *val)
 
static bool get_primitive_attribute (KernelGlobals *kg, const ShaderData *sd, const OSLGlobals::Attribute &attr, const TypeDesc &type, bool derivatives, void *val)
 
static bool get_mesh_attribute (KernelGlobals *kg, const ShaderData *sd, const OSLGlobals::Attribute &attr, const TypeDesc &type, bool derivatives, void *val)
 
static bool get_object_attribute (const OSLGlobals::Attribute &attr, TypeDesc type, bool derivatives, void *val)
 

Function Documentation

◆ copy_matrix() [1/2]

static void copy_matrix ( OSL::Matrix44 &  m,
const ProjectionTransform tfm 
)
static

Definition at line 72 of file osl_services.cpp.

References projection_transpose(), and t.

◆ copy_matrix() [2/2]

static CCL_NAMESPACE_BEGIN void copy_matrix ( OSL::Matrix44 &  m,
const Transform tfm 
)
static

◆ get_mesh_attribute()

static bool get_mesh_attribute ( KernelGlobals *  kg,
const ShaderData sd,
const OSLGlobals::Attribute &  attr,
const TypeDesc &  type,
bool  derivatives,
void *  val 
)
static

◆ get_object_attribute()

static bool get_object_attribute ( const OSLGlobals::Attribute &  attr,
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

◆ get_primitive_attribute()

static bool get_primitive_attribute ( KernelGlobals *  kg,
const ShaderData sd,
const OSLGlobals::Attribute &  attr,
const TypeDesc &  type,
bool  derivatives,
void *  val 
)
static

◆ set_attribute_float() [1/2]

static bool set_attribute_float ( float  f,
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

Definition at line 666 of file osl_services.cpp.

References set_attribute_float(), and type.

◆ set_attribute_float() [2/2]

static bool set_attribute_float ( float  f[3],
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

◆ set_attribute_float2() [1/2]

static bool set_attribute_float2 ( float2  f,
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

Definition at line 461 of file osl_services.cpp.

References make_float2, set_attribute_float2(), and type.

◆ set_attribute_float2() [2/2]

static bool set_attribute_float2 ( float2  f[3],
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

◆ set_attribute_float3() [1/2]

static bool set_attribute_float3 ( float3  f,
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

Definition at line 529 of file osl_services.cpp.

References make_float3, set_attribute_float3(), and type.

◆ set_attribute_float3() [2/2]

static bool set_attribute_float3 ( float3  f[3],
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

◆ set_attribute_float3_3()

static bool set_attribute_float3_3 ( float3  P[3],
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

Definition at line 712 of file osl_services.cpp.

References P(), Freestyle::Nature::POINT, and type.

Referenced by OSLRenderServices::get_object_standard_attribute().

◆ set_attribute_float4() [1/2]

static bool set_attribute_float4 ( float4  f,
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

Definition at line 599 of file osl_services.cpp.

References make_float4, set_attribute_float4(), and type.

◆ set_attribute_float4() [2/2]

static bool set_attribute_float4 ( float4  f[3],
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

◆ set_attribute_int()

static bool set_attribute_int ( int  i,
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

◆ set_attribute_matrix()

static bool set_attribute_matrix ( const Transform tfm,
TypeDesc  type,
void *  val 
)
static

Definition at line 740 of file osl_services.cpp.

References copy_matrix(), and type.

Referenced by get_mesh_attribute().

◆ set_attribute_string()

static bool set_attribute_string ( ustring  str,
TypeDesc  type,
bool  derivatives,
void *  val 
)
static

Definition at line 694 of file osl_services.cpp.

References str, type, and OSLRenderServices::u_empty.

Referenced by OSLRenderServices::get_object_standard_attribute().