Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

🤖 Generated with SplitRS

Functions§

add3
Add two 3-D vectors.
ambient_occlusion
Compute ambient occlusion by casting rays in the hemisphere.
atrous_denoise
A-trous wavelet denoising pass for progressive path traced images.
box_filter
Box filter denoising pass (simple spatial blur).
clamp_color
Clamp each component of a color to [0,1].
cosine_sample_hemisphere
Simple hemisphere sampler using cosine-weighted distribution.
cross3
Cross product of two 3-D vectors.
distribution_ggx
GGX normal distribution function.
dot3
Dot product of two 3-D vectors.
fresnel_schlick
Schlick Fresnel approximation.
gamma_correct
Apply sRGB gamma to a color.
geometry_smith
Smith’s geometry function (GGX).
length3
Length of a 3-D vector.
linear_to_srgb
Linear to sRGB gamma correction.
mul_color
Component-wise multiply two RGB colors.
normalize3
Normalize a 3-D vector (returns zero vector if near zero).
path_trace_step
Trace a single path and accumulate radiance.
pbr_shading
Cook-Torrance PBR BRDF shading.
phong_shading
Phong shading model.
reflect3
Reflect direction d about normal n (both normalized).
refract
Compute refraction direction using Snell’s law.
render_direct
Ray trace a simple scene (direct illumination only) on the CPU.
scale3
Scale a 3-D vector by a scalar.
schlick_reflectance
Schlick approximation for reflectance at a dielectric interface.
soft_shadow_factor
Compute soft shadow factor (0=fully shadowed, 1=fully lit) by sampling an area light with num_samples jittered samples.
sub3
Subtract two 3-D vectors.
temporal_accumulate
Temporal accumulation (exponential moving average) denoising.
tonemap_aces
ACES filmic tone mapping.
tonemap_filmic
Filmic tone mapping (Hejl and Burgess-Dawson approximation).
tonemap_reinhard
Reinhard tone mapping operator.
uniform_sample_hemisphere
Uniform hemisphere sampler.