Blender V5.3
gpu_shader_material_interface.bsl.hh File Reference
#include "gpu_shader_codegen_lib.glsl"

Go to the source code of this file.

Classes

struct  Closure
struct  ViewMatrices
struct  ObjectMatrices
struct  ObjectInfos
struct  ShadingData
struct  KernelGlobals
struct  Coordinates

Macros

#define CLOSURE_DEFAULT

Enumerations

enum  eObjectInfoFlag : uint32_t {
  OBJECT_SELECTED = (1u << 0u) , OBJECT_FROM_DUPLI = (1u << 1u) , OBJECT_FROM_SET = (1u << 2u) , OBJECT_ACTIVE = (1u << 3u) ,
  OBJECT_NEGATIVE_SCALE = (1u << 4u) , OBJECT_HOLDOUT = (1u << 5u) , OBJECT_ACTIVE_EDIT_MODE = (1u << 6u) , OBJECT_NO_INFO = ~OBJECT_HOLDOUT
}
enum  RayPipelineType : uint32_t { RAY_TYPE_CAMERA , RAY_TYPE_SHADOW , RAY_TYPE_DIFFUSE , RAY_TYPE_GLOSSY }

Functions

Closure closure_add (Closure, Closure)
Closure closure_mix (Closure, Closure, float)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureDiffuse)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureSubsurface)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureTranslucent)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureReflection)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureRefraction)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureThinRefraction)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureEmission)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureTransparency)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureVolumeScatter)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureVolumeAbsorption)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureHair)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureReflection, ClosureRefraction)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureDiffuse, ClosureReflection)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureReflection, ClosureReflection)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureVolumeScatter, ClosureVolumeAbsorption, ClosureEmission)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureDiffuse, ClosureReflection, ClosureReflection)
Closure closure_eval (KernelGlobals &, ShadingData &, ClosureDiffuse, ClosureReflection, ClosureReflection, ClosureRefraction)
float4 closure_to_rgba (KernelGlobals &, ShadingData &, Closure)
template<typename T>
float3 F_brdf_single_scatter (float3, float3, T)
template<typename T>
float3 F_brdf_multi_scatter (float3, float3, T)
void brdf_f82_tint_lut (const KernelGlobals &, float3, float3, float, float, bool, float3 &)
void bsdf_lut (const KernelGlobals &, float3, float3, float3, float, float, float, bool, float3 &, float3 &)
float2 bsdf_lut (const KernelGlobals &, float, float, float, bool)
float3 brdf_lut (KernelGlobals &, float3, float3, float, float, bool)
float f0_from_ior (float)
float F0_from_ior (float)
Coordinates coordinate_impl (KernelGlobals &, const ShadingData &, float3, float3)
float ambient_occlusion_eval (const KernelGlobals &, const ShadingData &, float3, float, float, float)
float4 attr_load_color_post (KernelGlobals &, float4 attr)
float attr_load_temperature_post (KernelGlobals &, float attr)
float4 attr_load_uniform (KernelGlobals &, const ShadingData &, float4, uint)
float4 node_attribute_layer_impl (KernelGlobals &, const uint)
float4 node_attribute_light_impl (KernelGlobals &, int, uint)
bool node_attribute_light_is_sun_impl (KernelGlobals &, int)
bool node_attribute_light_is_point_impl (KernelGlobals &, int)
bool node_attribute_light_is_spot_impl (KernelGlobals &, int)
bool node_attribute_light_is_area_impl (KernelGlobals &, int)
float node_attribute_light_cutoff_distance_impl (KernelGlobals &, int)
void scene_time_uniforms (KernelGlobals &, float &, float &)
void node_shadow_raycast_impl (KernelGlobals &, const ShadingData &, int, float3, float, float4 &)
void node_light_accumulation_impl (KernelGlobals &, ShadingData &, int, float3, float3, float3, float3, float3, float3, float, Closure &)
void node_light_info_impl (KernelGlobals &, const int, float4 &, float &, float3 &)
void node_light_evaluation_common_impl (KernelGlobals &, int, float3, float3 &, float &, float &)
template<bool use_diffuse>
void node_light_evaluation_impl (KernelGlobals &, const ShadingData &, int, float3, float3, float, float &)
template void node_light_evaluation_impl< true > (KernelGlobals &, const ShadingData &, int, float3, float3, float, float &)
template void node_light_evaluation_impl< false > (KernelGlobals &, const ShadingData &, int, float3, float3, float, float &)
void raycast_eval (KernelGlobals &, const ShadingData &, float3, float3, float, bool, bool &, bool &, float &, float3 &, float3 &)
float texture_lod_bias_get (KernelGlobals &)
float derivative_scale_get (KernelGlobals &)
void output_aov (KernelGlobals &, int2, float4, float, uint, float, eObjectInfoFlag)

Macro Definition Documentation

◆ CLOSURE_DEFAULT

#define CLOSURE_DEFAULT
Value:
{ \
}

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

Enumeration Type Documentation

◆ eObjectInfoFlag

enum eObjectInfoFlag : uint32_t
Enumerator
OBJECT_SELECTED 
OBJECT_FROM_DUPLI 
OBJECT_FROM_SET 
OBJECT_ACTIVE 
OBJECT_NEGATIVE_SCALE 
OBJECT_HOLDOUT 
OBJECT_ACTIVE_EDIT_MODE 
OBJECT_NO_INFO 

Definition at line 23 of file gpu_shader_material_interface.bsl.hh.

◆ RayPipelineType

enum RayPipelineType : uint32_t
Enumerator
RAY_TYPE_CAMERA 
RAY_TYPE_SHADOW 
RAY_TYPE_DIFFUSE 
RAY_TYPE_GLOSSY 

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

Function Documentation

◆ ambient_occlusion_eval()

float ambient_occlusion_eval ( const KernelGlobals & ,
const ShadingData & ,
float3 ,
float ,
float ,
float  )

◆ attr_load_color_post()

float4 attr_load_color_post ( KernelGlobals & ,
float4 attr )

Definition at line 349 of file gpu_shader_material_interface.bsl.hh.

References attr_load_color_post(), and resource_table.

◆ attr_load_temperature_post()

float attr_load_temperature_post ( KernelGlobals & ,
float attr )

◆ attr_load_uniform()

float4 attr_load_uniform ( KernelGlobals & ,
const ShadingData & ,
float4 ,
uint  )

Definition at line 359 of file gpu_shader_material_interface.bsl.hh.

References attr_load_uniform(), and resource_table.

◆ brdf_f82_tint_lut()

void brdf_f82_tint_lut ( const KernelGlobals & ,
float3 ,
float3 ,
float ,
float ,
bool ,
float3 &  )

Definition at line 266 of file gpu_shader_material_interface.bsl.hh.

References brdf_f82_tint_lut(), and resource_table.

◆ brdf_lut()

float3 brdf_lut ( KernelGlobals & ,
float3 ,
float3 ,
float ,
float ,
bool  )

Definition at line 298 of file gpu_shader_material_interface.bsl.hh.

References brdf_lut(), and resource_table.

◆ bsdf_lut() [1/2]

float2 bsdf_lut ( const KernelGlobals & ,
float ,
float ,
float ,
bool  )

Definition at line 289 of file gpu_shader_material_interface.bsl.hh.

References bsdf_lut(), and resource_table.

◆ bsdf_lut() [2/2]

void bsdf_lut ( const KernelGlobals & ,
float3 ,
float3 ,
float3 ,
float ,
float ,
float ,
bool ,
float3 & ,
float3 &  )

Definition at line 276 of file gpu_shader_material_interface.bsl.hh.

References bsdf_lut(), and resource_table.

◆ closure_add()

Closure closure_add ( Closure ,
Closure  )

Definition at line 136 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_add().

◆ closure_eval() [1/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureDiffuse  )

Definition at line 144 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [2/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureDiffuse ,
ClosureReflection  )

Definition at line 209 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [3/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureDiffuse ,
ClosureReflection ,
ClosureReflection  )

Definition at line 231 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [4/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureDiffuse ,
ClosureReflection ,
ClosureReflection ,
ClosureRefraction  )

Definition at line 239 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [5/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureEmission  )

Definition at line 176 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [6/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureHair  )

Definition at line 198 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [7/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureReflection  )

Definition at line 158 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [8/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureReflection ,
ClosureReflection  )

Definition at line 216 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [9/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureReflection ,
ClosureRefraction  )

Definition at line 202 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [10/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureRefraction  )

Definition at line 164 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [11/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureSubsurface  )

Definition at line 148 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [12/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureThinRefraction  )

Definition at line 170 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [13/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureTranslucent  )

Definition at line 152 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [14/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureTransparency  )

Definition at line 180 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [15/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureVolumeAbsorption  )

Definition at line 192 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [16/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureVolumeScatter  )

Definition at line 186 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_eval() [17/17]

Closure closure_eval ( KernelGlobals & ,
ShadingData & ,
ClosureVolumeScatter ,
ClosureVolumeAbsorption ,
ClosureEmission  )

Definition at line 223 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_eval().

◆ closure_mix()

Closure closure_mix ( Closure ,
Closure ,
float  )

Definition at line 140 of file gpu_shader_material_interface.bsl.hh.

References Closure, and closure_mix().

◆ closure_to_rgba()

float4 closure_to_rgba ( KernelGlobals & kg,
ShadingData & sd,
Closure cl )

◆ coordinate_impl()

Coordinates coordinate_impl ( KernelGlobals & ,
const ShadingData & ,
float3 ,
float3  )

Definition at line 327 of file gpu_shader_material_interface.bsl.hh.

References coordinate_impl(), and resource_table.

◆ derivative_scale_get()

float derivative_scale_get ( KernelGlobals & )

Definition at line 498 of file gpu_shader_material_interface.bsl.hh.

References derivative_scale_get(), and resource_table.

◆ F0_from_ior()

float F0_from_ior ( float )

Definition at line 313 of file gpu_shader_material_interface.bsl.hh.

References F0_from_ior().

◆ f0_from_ior()

float f0_from_ior ( float )

Definition at line 308 of file gpu_shader_material_interface.bsl.hh.

References f0_from_ior().

◆ F_brdf_multi_scatter()

template<typename T>
float3 F_brdf_multi_scatter ( float3 ,
float3 ,
T  )

Definition at line 261 of file gpu_shader_material_interface.bsl.hh.

References F_brdf_multi_scatter(), and T.

◆ F_brdf_single_scatter()

template<typename T>
float3 F_brdf_single_scatter ( float3 ,
float3 ,
T  )

Definition at line 256 of file gpu_shader_material_interface.bsl.hh.

References F_brdf_single_scatter(), and T.

◆ node_attribute_layer_impl()

float4 node_attribute_layer_impl ( KernelGlobals & ,
const uint  )

◆ node_attribute_light_cutoff_distance_impl()

float node_attribute_light_cutoff_distance_impl ( KernelGlobals & ,
int  )

◆ node_attribute_light_impl()

float4 node_attribute_light_impl ( KernelGlobals & ,
int ,
uint  )

◆ node_attribute_light_is_area_impl()

bool node_attribute_light_is_area_impl ( KernelGlobals & ,
int  )

◆ node_attribute_light_is_point_impl()

bool node_attribute_light_is_point_impl ( KernelGlobals & ,
int  )

◆ node_attribute_light_is_spot_impl()

bool node_attribute_light_is_spot_impl ( KernelGlobals & ,
int  )

◆ node_attribute_light_is_sun_impl()

bool node_attribute_light_is_sun_impl ( KernelGlobals & ,
int  )

◆ node_light_accumulation_impl()

void node_light_accumulation_impl ( KernelGlobals & ,
ShadingData & ,
int ,
float3 ,
float3 ,
float3 ,
float3 ,
float3 ,
float3 ,
float ,
Closure &  )

◆ node_light_evaluation_common_impl()

void node_light_evaluation_common_impl ( KernelGlobals & ,
int ,
float3 ,
float3 & ,
float & ,
float &  )

◆ node_light_evaluation_impl()

template<bool use_diffuse>
void node_light_evaluation_impl ( KernelGlobals & ,
const ShadingData & ,
int ,
float3 ,
float3 ,
float ,
float &  )

◆ node_light_evaluation_impl< false >()

template void node_light_evaluation_impl< false > ( KernelGlobals & ,
const ShadingData & ,
int ,
float3 ,
float3 ,
float ,
float &  )

◆ node_light_evaluation_impl< true >()

template void node_light_evaluation_impl< true > ( KernelGlobals & ,
const ShadingData & ,
int ,
float3 ,
float3 ,
float ,
float &  )

◆ node_light_info_impl()

void node_light_info_impl ( KernelGlobals & ,
const int ,
float4 & ,
float & ,
float3 &  )

Definition at line 440 of file gpu_shader_material_interface.bsl.hh.

References node_light_info_impl(), and resource_table.

◆ node_shadow_raycast_impl()

void node_shadow_raycast_impl ( KernelGlobals & ,
const ShadingData & ,
int ,
float3 ,
float ,
float4 &  )

◆ output_aov()

void output_aov ( KernelGlobals & ,
int2 ,
float4 ,
float ,
uint ,
float ,
eObjectInfoFlag  )

Definition at line 505 of file gpu_shader_material_interface.bsl.hh.

References output_aov(), and resource_table.

◆ raycast_eval()

void raycast_eval ( KernelGlobals & ,
const ShadingData & ,
float3 ,
float3 ,
float ,
bool ,
bool & ,
bool & ,
float & ,
float3 & ,
float3 &  )

Definition at line 477 of file gpu_shader_material_interface.bsl.hh.

References raycast_eval(), and resource_table.

◆ scene_time_uniforms()

void scene_time_uniforms ( KernelGlobals & ,
float & ,
float &  )

Definition at line 405 of file gpu_shader_material_interface.bsl.hh.

References resource_table, and scene_time_uniforms().

◆ texture_lod_bias_get()

float texture_lod_bias_get ( KernelGlobals & )

Definition at line 493 of file gpu_shader_material_interface.bsl.hh.

References resource_table, and texture_lod_bias_get().