Blender V5.0
blender::workbench Namespace Reference

Classes

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

Typedefs

using StaticShader = gpu::StaticShader

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 bool operator!= (const View3DShading &a, const View3DShading &b)
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

Typedef Documentation

◆ StaticShader

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

enum class blender::workbench::StencilBits : uint8_t
strong
Enumerator
BACKGROUND 
OBJECT 
OBJECT_IN_FRONT 

Definition at line 323 of file workbench_private.hh.

Function Documentation

◆ filter_blackman_harris()

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

Definition at line 84 of file workbench_effect_antialiasing.cc.

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

Referenced by setup_taa_weights().

◆ geometry_type_from_object()

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()

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

◆ get_loop_custom_data()

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

◆ get_matcap_tx()

◆ get_material_texture()

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

References get_material_texture().

Referenced by get_material_texture().

◆ get_name() [1/2]

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

Definition at line 18 of file workbench_enums.hh.

References BLI_assert_unreachable, CURVES, MESH, and POINTCLOUD.

◆ get_name() [2/2]

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()

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

◆ get_vert_custom_data()

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

◆ get_world_shading_rotation_matrix()

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

◆ lighting_type_from_v3d_lighting()

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

◆ operator!=()

◆ setup_taa_weights()

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

◆ shader_type_from_v3d_shading()

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()

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 30 of file workbench_effect_dof.cc.

References M_PI_4, T, 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