Blender V5.3
workbench Namespace Reference

Namespaces

namespace  color
namespace  depth
namespace  dof
namespace  outline
namespace  prepass
namespace  resolve
namespace  shadow
namespace  taa
namespace  transparency
namespace  volume

Classes

struct  Cavity
struct  World

Functions

void cavity_compute (const workbench::Cavity &cavity, const workbench::World &world, ViewMatrices view, sampler2DDepth depth_tx, sampler2D normal_tx, float2 screenco, float &cavities, float &edges)
float3 normal_decode (float4 enc)
float2 normal_encode (bool front_face, float3 n)
float float_pair_encode (float v1, float v2)
void float_pair_decode (float data, float &v1, float &v2)
float curvature_soft_clamp (float curvature, float control)
void curvature_compute (const workbench::World &world, usampler2D object_id_tx, sampler2D normal_tx, float2 uv, float &curvature)
float2 matcap_uv_compute (float3 I, float3 N, bool flipped)
float3 get_matcap_lighting (const workbench::World &world, sampler2D diffuse_matcap, sampler2D specular_matcap, float3 base_color, float3 N, float3 I)
float3 get_matcap_lighting (const workbench::World &world, sampler2DArray matcap, float3 base_color, float3 N, float3 I)
float4 fast_rcp (float4 v)
float3 brdf_approx (float3 spec_color, float roughness, float NV)
float4 blinn_specular (float4 shininess, float4 spec_angle, float4 NL)
float4 wrapped_lighting (float4 NL, float4 w)
float3 get_world_lighting (const workbench::World &world, float3 base_color, float roughness, float metallic, float3 N, float3 I)
float get_shadow (const workbench::World &world, float3 N, bool force_shadow)

Function Documentation

◆ blinn_specular()

float4 workbench::blinn_specular ( float4 shininess,
float4 spec_angle,
float4 NL )

Definition at line 28 of file workbench_world_light.bsl.hh.

References blinn_specular(), NL, and pow.

Referenced by blinn_specular(), and get_world_lighting().

◆ brdf_approx()

float3 workbench::brdf_approx ( float3 spec_color,
float roughness,
float NV )

Definition at line 19 of file workbench_world_light.bsl.hh.

References brdf_approx(), exp2, and mix.

Referenced by brdf_approx(), and get_world_lighting().

◆ cavity_compute()

◆ curvature_compute()

◆ curvature_soft_clamp()

float workbench::curvature_soft_clamp ( float curvature,
float control )

Definition at line 11 of file workbench_curvature.bsl.hh.

References curvature_soft_clamp().

Referenced by curvature_compute(), and curvature_soft_clamp().

◆ fast_rcp()

float4 workbench::fast_rcp ( float4 v)

Definition at line 14 of file workbench_world_light.bsl.hh.

References fast_rcp(), floatBitsToInt, and intBitsToFloat.

Referenced by fast_rcp(), and wrapped_lighting().

◆ float_pair_decode()

void workbench::float_pair_decode ( float data,
float & v1,
float & v2 )

Definition at line 63 of file workbench_common.bsl.hh.

References float, float_pair_decode(), and ROUGHNESS_BITS.

Referenced by float_pair_decode(), and workbench::resolve::frag().

◆ float_pair_encode()

float workbench::float_pair_encode ( float v1,
float v2 )

◆ get_matcap_lighting() [1/2]

◆ get_matcap_lighting() [2/2]

float3 workbench::get_matcap_lighting ( const workbench::World & world,
sampler2DArray matcap,
float3 base_color,
float3 N,
float3 I )

◆ get_shadow()

◆ get_world_lighting()

◆ matcap_uv_compute()

float2 workbench::matcap_uv_compute ( float3 I,
float3 N,
bool flipped )

Definition at line 13 of file workbench_matcap.bsl.hh.

References b, dot(), I, matcap_uv_compute(), N, and float2::x.

Referenced by get_matcap_lighting(), get_matcap_lighting(), and matcap_uv_compute().

◆ normal_decode()

◆ normal_encode()

float2 workbench::normal_encode ( bool front_face,
float3 n )

Definition at line 37 of file workbench_common.bsl.hh.

References clamp(), normal_encode(), normalize, sqrt, and float3::z.

Referenced by workbench::prepass::frag_opaque(), and normal_encode().

◆ wrapped_lighting()

float4 workbench::wrapped_lighting ( float4 NL,
float4 w )

Definition at line 39 of file workbench_world_light.bsl.hh.

References clamp(), fast_rcp(), NL, w(), and wrapped_lighting().

Referenced by get_world_lighting(), and wrapped_lighting().