Blender V5.3
stdcycles.h File Reference
#include "stdosl.h"

Go to the source code of this file.

Macros

#define FLT_MAX   3.402823466e+38
#define BUMP_FILTER_WIDTH   0.1
#define BUILTIN   [[int builtin = 1]]
#define BUILTIN_DERIV   [[ int builtin = 1, int deriv = 1 ]]

Functions

closure color diffuse_ramp (normal N, color colors[8]) BUILTIN
closure color phong_ramp (normal N, float exponent, color colors[8]) BUILTIN
closure color diffuse_toon (normal N, float size, float smooth) BUILTIN
closure color glossy_toon (normal N, float size, float smooth) BUILTIN
closure color ashikhmin_velvet (normal N, float sigma) BUILTIN
closure color microfacet_f82_tint (string distribution, vector N, vector T, float ax, float ay, color f0, color f82) BUILTIN
closure color microfacet_multi_ggx_glass (normal N, float ag, float eta, color C) BUILTIN
closure color microfacet_multi_ggx_aniso (normal N, vector T, float ax, float ay, color C) BUILTIN
closure color thin_glass (normal N, vector T, color reflection, color transmission, float ior, float alpha, float thinfilm_thickness, float thinfilm_ior) BUILTIN
closure color thin_subsurface (normal N, vector T, color C, float anisotropy, float roughness) BUILTIN
closure color coat_bsdf (color C, float ior, float roughness, normal N) BUILTIN
closure color bssrdf (string method, normal N, vector radius, color albedo) BUILTIN
closure color hair_reflection (normal N, float roughnessu, float roughnessv, vector T, float offset) BUILTIN
closure color hair_transmission (normal N, float roughnessu, float roughnessv, vector T, float offset) BUILTIN
closure color hair_chiang (normal N, color sigma, float roughnessu, float roughnessv, float coat, float alpha, float eta) BUILTIN
closure color hair_huang (normal N, color sigma, float roughness, float tilt, float eta, float aspect_ratio, float r_lobe, float tt_lobe, float trt_lobe) BUILTIN
closure color henyey_greenstein (float g) BUILTIN
closure color fournier_forand (float B, float IOR) BUILTIN
closure color draine (float g, float alpha) BUILTIN
closure color rayleigh () BUILTIN
closure color absorption () BUILTIN
closure color ray_portal_bsdf (vector position, vector direction) BUILTIN
point camera_shader_raster_position ()
vector camera_shader_random_sample ()
closure color sheen (normal N, float roughness)

Macro Definition Documentation

◆ BUILTIN

◆ BUILTIN_DERIV

#define BUILTIN_DERIV   [[ int builtin = 1, int deriv = 1 ]]

Definition at line 22 of file stdcycles.h.

◆ BUMP_FILTER_WIDTH

#define BUMP_FILTER_WIDTH   0.1

Definition at line 17 of file stdcycles.h.

◆ FLT_MAX

#define FLT_MAX   3.402823466e+38

Definition at line 14 of file stdcycles.h.

Function Documentation

◆ absorption()

closure color absorption ( )

◆ ashikhmin_velvet()

closure color ashikhmin_velvet ( normal N,
float sigma )

References ashikhmin_velvet(), BUILTIN, and N.

Referenced by ashikhmin_velvet().

◆ bssrdf()

closure color bssrdf ( string method,
normal N,
vector radius,
color albedo )

◆ camera_shader_random_sample()

vector camera_shader_random_sample ( )

Definition at line 90 of file stdcycles.h.

References camera_shader_random_sample(), and N.

Referenced by camera_shader_random_sample().

◆ camera_shader_raster_position()

point camera_shader_raster_position ( )

Definition at line 85 of file stdcycles.h.

References camera_shader_raster_position(), and P.

Referenced by camera_shader_raster_position().

◆ coat_bsdf()

closure color coat_bsdf ( color C,
float ior,
float roughness,
normal N )

References BUILTIN, C, coat_bsdf(), and N.

Referenced by bsdf_coat_setup(), and coat_bsdf().

◆ diffuse_ramp()

closure color diffuse_ramp ( normal N,
color colors[8] )

References BUILTIN, diffuse_ramp(), and N.

Referenced by diffuse_ramp().

◆ diffuse_toon()

closure color diffuse_toon ( normal N,
float size,
float smooth )

References BUILTIN, diffuse_toon(), N, size(), and smooth.

Referenced by diffuse_toon().

◆ draine()

closure color draine ( float g,
float alpha )

References BUILTIN, and draine().

Referenced by draine(), scatter(), and svm_alloc_closure_volume_scatter().

◆ fournier_forand()

closure color fournier_forand ( float B,
float IOR )

References B, BUILTIN, and fournier_forand().

Referenced by fournier_forand(), and scatter().

◆ glossy_toon()

closure color glossy_toon ( normal N,
float size,
float smooth )

References BUILTIN, glossy_toon(), N, size(), and smooth.

Referenced by glossy_toon().

◆ hair_chiang()

closure color hair_chiang ( normal N,
color sigma,
float roughnessu,
float roughnessv,
float coat,
float alpha,
float eta )

References BUILTIN, hair_chiang(), and N.

Referenced by hair_chiang().

◆ hair_huang()

closure color hair_huang ( normal N,
color sigma,
float roughness,
float tilt,
float eta,
float aspect_ratio,
float r_lobe,
float tt_lobe,
float trt_lobe )

References BUILTIN, hair_huang(), and N.

Referenced by hair_huang().

◆ hair_reflection()

closure color hair_reflection ( normal N,
float roughnessu,
float roughnessv,
vector T,
float offset )

References BUILTIN, hair_reflection(), N, and T.

Referenced by hair_reflection().

◆ hair_transmission()

closure color hair_transmission ( normal N,
float roughnessu,
float roughnessv,
vector T,
float offset )

References BUILTIN, hair_transmission(), N, and T.

Referenced by hair_transmission().

◆ henyey_greenstein()

closure color henyey_greenstein ( float g)

References BUILTIN, and henyey_greenstein().

Referenced by henyey_greenstein(), and scatter().

◆ microfacet_f82_tint()

closure color microfacet_f82_tint ( string distribution,
vector N,
vector T,
float ax,
float ay,
color f0,
color f82 )

◆ microfacet_multi_ggx_aniso()

closure color microfacet_multi_ggx_aniso ( normal N,
vector T,
float ax,
float ay,
color C )

◆ microfacet_multi_ggx_glass()

closure color microfacet_multi_ggx_glass ( normal N,
float ag,
float eta,
color C )

◆ phong_ramp()

closure color phong_ramp ( normal N,
float exponent,
color colors[8] )

References BUILTIN, N, and phong_ramp().

Referenced by phong_ramp().

◆ ray_portal_bsdf()

closure color ray_portal_bsdf ( vector position,
vector direction )

References BUILTIN, position, and ray_portal_bsdf().

Referenced by ray_portal_bsdf().

◆ rayleigh()

closure color rayleigh ( )

References BUILTIN, and rayleigh().

Referenced by rayleigh(), and scatter().

◆ sheen()

◆ thin_glass()

closure color thin_glass ( normal N,
vector T,
color reflection,
color transmission,
float ior,
float alpha,
float thinfilm_thickness,
float thinfilm_ior )

◆ thin_subsurface()

closure color thin_subsurface ( normal N,
vector T,
color C,
float anisotropy,
float roughness )

References BUILTIN, C, N, T, and thin_subsurface().

Referenced by OSL_CLOSURE_STRUCT_MEMBER(), and thin_subsurface().