Blender V4.3
blender::workbench Namespace Reference

Classes

class  AntiAliasingPass
 
class  CavityEffect
 
class  DofPass
 
class  Instance
 
struct  Material
 
struct  MaterialTexture
 
class  MeshPass
 
struct  ObjectState
 
class  OpaquePass
 
class  OutlinePass
 
struct  SceneResources
 
struct  SceneState
 
class  ShaderCache
 
class  ShadowPass
 
class  StaticShader
 
class  StencilViewWorkaround
 
class  TaaSamples
 
class  TransparentDepthPass
 
class  TransparentPass
 
class  VolumePass
 

Enumerations

enum class  eGeometryType { MESH = 0 , CURVES , POINTCLOUD }
 
enum class  ePipelineType { OPAQUE = 0 , TRANSPARENT }
 
enum class  eLightingType { FLAT = 0 , STUDIO , MATCAP }
 
enum class  eShaderType { MATERIAL = 0 , TEXTURE }
 
enum class  StencilBits : uint8_t { BACKGROUND = 0 , OBJECT = 1u << 0 , OBJECT_IN_FRONT = 1u << 1 }
 

Functions

static const TaaSamplesget_taa_samples ()
 
static float filter_blackman_harris (float x, const float width)
 
static void setup_taa_weights (const float2 offset, float r_weights[9], float &r_weight_sum)
 
static void square_to_circle (float x, float y, float &r, float &T)
 
static const char * get_name (eGeometryType type)
 
static eGeometryType geometry_type_from_object (Object *ob)
 
static eLightingType lighting_type_from_v3d_lighting (char lighting)
 
static eShaderType shader_type_from_v3d_shading (char shading)
 
static const char * get_name (eShaderType type)
 
ImageGPUTextures get_material_texture (GPUSamplerState &sampler_state)
 
static bool get_matcap_tx (Texture &matcap_tx, StudioLight &studio_light)
 
static float4x4 get_world_shading_rotation_matrix (float studiolight_rot_z)
 
static LightData get_light_data_from_studio_solidlight (const SolidLight *sl, const float4x4 &world_shading_rotation)
 
static const CustomDataget_loop_custom_data (const Mesh *mesh)
 
static const CustomDataget_vert_custom_data (const Mesh *mesh)
 

Variables

static constexpr int geometry_type_len = static_cast<int>(eGeometryType::POINTCLOUD) + 1
 
static constexpr int pipeline_type_len = static_cast<int>(ePipelineType::TRANSPARENT) + 1
 
static constexpr int lighting_type_len = static_cast<int>(eLightingType::MATCAP) + 1
 
static constexpr int shader_type_len = static_cast<int>(eShaderType::TEXTURE) + 1
 

Enumeration Type Documentation

◆ eGeometryType

Enumerator
MESH 
CURVES 
POINTCLOUD 

Definition at line 11 of file workbench_enums.hh.

◆ eLightingType

Enumerator
FLAT 
STUDIO 
MATCAP 

Definition at line 51 of file workbench_enums.hh.

◆ ePipelineType

Enumerator
OPAQUE 
TRANSPARENT 

Definition at line 45 of file workbench_enums.hh.

◆ eShaderType

Enumerator
MATERIAL 
TEXTURE 

Definition at line 73 of file workbench_enums.hh.

◆ StencilBits

Enumerator
BACKGROUND 
OBJECT 
OBJECT_IN_FRONT 

Definition at line 329 of file workbench_private.hh.

Function Documentation

◆ filter_blackman_harris()

static float blender::workbench::filter_blackman_harris ( float x,
const float width )
static

Definition at line 83 of file workbench_effect_antialiasing.cc.

References clamp_f(), blender::math::cos(), and M_PI.

Referenced by setup_taa_weights().

◆ geometry_type_from_object()

static eGeometryType blender::workbench::geometry_type_from_object ( Object * ob)
inlinestatic

Definition at line 33 of file workbench_enums.hh.

References CURVES, MESH, OB_CURVES, OB_POINTCLOUD, POINTCLOUD, and Object::type.

◆ get_light_data_from_studio_solidlight()

static LightData blender::workbench::get_light_data_from_studio_solidlight ( const SolidLight * sl,
const float4x4 & world_shading_rotation )
static

◆ get_loop_custom_data()

static const CustomData * blender::workbench::get_loop_custom_data ( const Mesh * mesh)
static

Definition at line 183 of file workbench_state.cc.

References BLI_assert, and ME_WRAPPER_TYPE_BMESH.

Referenced by blender::workbench::ObjectState::ObjectState().

◆ get_matcap_tx()

◆ get_material_texture()

ImageGPUTextures blender::workbench::get_material_texture ( GPUSamplerState & sampler_state)

◆ get_name() [1/2]

static const char * blender::workbench::get_name ( eGeometryType type)
inlinestatic

◆ get_name() [2/2]

static const char * blender::workbench::get_name ( eShaderType type)
inlinestatic

Definition at line 84 of file workbench_enums.hh.

References BLI_assert_unreachable, MATERIAL, and TEXTURE.

◆ get_taa_samples()

static const TaaSamples & blender::workbench::get_taa_samples ( )
static

◆ get_vert_custom_data()

static const CustomData * blender::workbench::get_vert_custom_data ( const Mesh * mesh)
static

Definition at line 193 of file workbench_state.cc.

References BLI_assert, and ME_WRAPPER_TYPE_BMESH.

Referenced by blender::workbench::ObjectState::ObjectState().

◆ get_world_shading_rotation_matrix()

static float4x4 blender::workbench::get_world_shading_rotation_matrix ( float studiolight_rot_z)
static

◆ lighting_type_from_v3d_lighting()

static eLightingType blender::workbench::lighting_type_from_v3d_lighting ( char lighting)
inlinestatic

◆ setup_taa_weights()

static void blender::workbench::setup_taa_weights ( const float2 offset,
float r_weights[9],
float & r_weight_sum )
static

◆ shader_type_from_v3d_shading()

static eShaderType blender::workbench::shader_type_from_v3d_shading ( char shading)
inlinestatic

Definition at line 79 of file workbench_enums.hh.

References MATERIAL, TEXTURE, and V3D_SHADING_TEXTURE_COLOR.

◆ square_to_circle()

static void blender::workbench::square_to_circle ( float x,
float y,
float & r,
float & T )
static

Transform [-1..1] square to unit circle.

Definition at line 29 of file workbench_effect_dof.cc.

References M_PI_4, x, and y.

Variable Documentation

◆ geometry_type_len

int blender::workbench::geometry_type_len = static_cast<int>(eGeometryType::POINTCLOUD) + 1
staticconstexpr

◆ lighting_type_len

int blender::workbench::lighting_type_len = static_cast<int>(eLightingType::MATCAP) + 1
staticconstexpr

Definition at line 56 of file workbench_enums.hh.

Referenced by blender::workbench::ShaderCache::ShaderCache().

◆ pipeline_type_len

int blender::workbench::pipeline_type_len = static_cast<int>(ePipelineType::TRANSPARENT) + 1
staticconstexpr

Definition at line 49 of file workbench_enums.hh.

Referenced by blender::workbench::ShaderCache::ShaderCache().

◆ shader_type_len

int blender::workbench::shader_type_len = static_cast<int>(eShaderType::TEXTURE) + 1
staticconstexpr