Blender V5.3
eevee_bxdf_diffuse.bsl.hh File Reference
#include "eevee_bxdf_types.bsl.hh"
#include "eevee_ltc_lut_lib.bsl.hh"
#include "eevee_sampling_lib.bsl.hh"
#include "eevee_thickness_lib.bsl.hh"
#include "gpu_shader_codegen_lib.glsl"
#include "gpu_shader_math_base.bsl.hh"
#include "gpu_shader_math_safe.bsl.hh"
#include "gpu_shader_ray.bsl.hh"

Go to the source code of this file.

Functions

Diffuse BSDF
BsdfSample bxdf_diffuse_sample (const float3 rand_cylinder)
BsdfEval bxdf_diffuse_eval (float3 N, float3 L)
float bxdf_diffuse_perceived_roughness ()
LightProbeRay bxdf_diffuse_lightprobe (float3 N)
ClosureLight bxdf_diffuse_light (ClosureUndetermined cl, float3 V)
Translucent BSDF
BsdfSample bxdf_translucent_sample (float3 rand, Thickness thickness)
BsdfEval bxdf_translucent_eval (float3 N, float3 L, Thickness thickness)
float bxdf_translucent_perceived_roughness ()
LightProbeRay bxdf_translucent_lightprobe (float3 N, Thickness thickness)
Ray bxdf_translucent_ray_amend (ClosureUndetermined cl, float3, Ray ray, Thickness thickness)
ClosureLight bxdf_translucent_light (ClosureUndetermined cl, float3 V, Thickness thickness)

Function Documentation

◆ bxdf_diffuse_eval()

BsdfEval bxdf_diffuse_eval ( float3 N,
float3 L )

Definition at line 35 of file eevee_bxdf_diffuse.bsl.hh.

References bxdf_diffuse_eval(), dot(), L, M_1_PI, N, and saturate.

Referenced by bxdf_diffuse_eval(), and closure_evaluate_pdf().

◆ bxdf_diffuse_light()

ClosureLight bxdf_diffuse_light ( ClosureUndetermined cl,
float3 V )

◆ bxdf_diffuse_lightprobe()

◆ bxdf_diffuse_perceived_roughness()

float bxdf_diffuse_perceived_roughness ( )

◆ bxdf_diffuse_sample()

BsdfSample bxdf_diffuse_sample ( const float3 rand_cylinder)

Returns a tangent space diffuse direction following the Lambertian distribution.

Parameters
rand_cylinderrandom point on the unit cylinder (result of sample_cylinder). The Z component can be biased towards 1.
Returns
pdf: the pdf of sampling the reflected/refracted ray. 0 if ray is invalid.

Definition at line 27 of file eevee_bxdf_diffuse.bsl.hh.

References bxdf_diffuse_sample(), BsdfSample::direction, M_1_PI, BsdfSample::pdf, sample_cos_hemisphere(), and packed_float3::z.

Referenced by bxdf_diffuse_sample(), bxdf_translucent_sample(), and eevee::ray_generate_direction().

◆ bxdf_translucent_eval()

BsdfEval bxdf_translucent_eval ( float3 N,
float3 L,
Thickness thickness )

◆ bxdf_translucent_light()

◆ bxdf_translucent_lightprobe()

◆ bxdf_translucent_perceived_roughness()

◆ bxdf_translucent_ray_amend()

Ray bxdf_translucent_ray_amend ( ClosureUndetermined cl,
float3 ,
Ray ray,
Thickness thickness )

◆ bxdf_translucent_sample()

BsdfSample bxdf_translucent_sample ( float3 rand,
Thickness thickness )

Returns a tangent space diffuse direction following and inverted Lambertian distribution.

Parameters
randrandom point on the unit cylinder (result of sample_cylinder). The Z component can be biased towards 1.
thicknessThickness of the object. 0 is considered thin.
Returns
pdf: the pdf of sampling the reflected/refracted ray. 0 if ray is invalid.

Definition at line 78 of file eevee_bxdf_diffuse.bsl.hh.

References bxdf_diffuse_sample(), bxdf_translucent_sample(), cos_theta(), BsdfSample::direction, M_1_PI, Thickness::mode(), BsdfSample::pdf, sin_from_cos(), Sphere, Thickness::value(), and float3::x.

Referenced by bxdf_translucent_sample(), and eevee::ray_generate_direction().