|
Blender V5.3
|
#include "eevee_bxdf_types.bsl.hh"#include "eevee_ltc_lut_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_fast.bsl.hh"#include "gpu_shader_math_vector.bsl.hh"#include "gpu_shader_math_vector_safe.bsl.hh"#include "gpu_shader_ray.bsl.hh"Go to the source code of this file.
| void bxdf_ggx_context_amend_transmission | ( | ClosureUndetermined & | cl, |
| float3 & | V, | ||
| Thickness | thickness ) |
Definition at line 390 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_context_amend_transmission(), bxdf_ggx_dominant_direction_transmission(), bxdf_ggx_perceived_roughness_transmission(), ThicknessIsect::hit_N, L, Thickness::shape_intersect(), V, and Thickness::value().
Referenced by bxdf_ggx_context_amend_transmission(), bxdf_lightprobe_ray(), eevee::ray_generate_direction(), and eevee::raytracing::denoise::transmission_thickness_amend_closure().
Definition at line 21 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_D(), M_PI, and square().
Referenced by bxdf_ggx_D(), bxdf_ggx_eval_reflection(), bxdf_ggx_eval_refraction(), bxdf_ggx_sample_reflection(), and bxdf_ggx_sample_refraction().
Returns the dominant direction for one reflection event. roughness is expected to be the linear (from UI) roughness.
Definition at line 334 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_dominant_direction_reflection(), mix, N, normalize, R, reflect, sqrt, square(), and V.
Referenced by bxdf_ggx_dominant_direction_reflection(), bxdf_ggx_lightprobe_reflection(), and bxdf_ggx_lightprobe_thin_glass_transmission().
Returns the dominant direction for one transmission event. roughness is expected to be the reflection roughness from bxdf_ggx_perceived_roughness_transmission.
Definition at line 352 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_dominant_direction_transmission(), mix, N, normalize, R, refract(), sqrt, square(), and V.
Referenced by bxdf_ggx_context_amend_transmission(), bxdf_ggx_dominant_direction_transmission(), bxdf_ggx_light_transmission(), bxdf_ggx_lightprobe_transmission(), and bxdf_ggx_ray_amend_transmission().
Definition at line 103 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_D(), bxdf_ggx_eval_reflection(), bxdf_ggx_smith_G1(), D, dot(), H, L, max, N, NL, safe_normalize(), saturate, sqrt, square(), and V.
Referenced by bxdf_ggx_eval_reflection(), closure_evaluate_pdf(), eevee::lut::GGXBrdfClosure::eval(), and eevee::lut::GGXBsdfClosure::eval().
| BsdfEval bxdf_ggx_eval_refraction | ( | float3 | N, |
| float3 | L, | ||
| float3 | V, | ||
| float | alpha, | ||
| float | ior, | ||
| Thickness | thickness, | ||
| const bool | do_clamp ) |
Definition at line 240 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_D(), bxdf_ggx_eval_refraction(), bxdf_ggx_smith_G1(), D, dot(), float, H, is_equal(), L, length(), max, N, NL, safe_rcp(), saturate, square(), V, and Thickness::value().
Referenced by bxdf_ggx_eval_refraction(), closure_evaluate_pdf(), eevee::lut::GGXBsdfClosure::eval(), and eevee::lut::GGXBtdfGt1Closure::eval().
| ClosureLight bxdf_ggx_light_reflection | ( | const UtilityTexture & | util_tx, |
| ClosureReflection | cl, | ||
| float3 | V ) |
Definition at line 414 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_light_reflection(), cos_theta(), dot(), ClosureLight::N, eevee::LTCData::pack_ltc_lut(), ClosureLight::type, and V.
Referenced by bxdf_ggx_light_reflection(), and closure_light_new_ex().
| ClosureLight bxdf_ggx_light_thin_glass_transmission | ( | const UtilityTexture & | util_tx, |
| ClosureThinRefraction | cl, | ||
| float3 | V ) |
Definition at line 456 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_light_thin_glass_transmission(), cos_theta(), dot(), ClosureLight::N, eevee::LTCData::pack_ltc_lut(), ClosureLight::type, and V.
Referenced by bxdf_ggx_light_thin_glass_transmission(), and closure_light_new_ex().
| ClosureLight bxdf_ggx_light_transmission | ( | const UtilityTexture & | util_tx, |
| ClosureRefraction | cl, | ||
| float3 | V, | ||
| Thickness | thickness ) |
Definition at line 428 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_dominant_direction_transmission(), bxdf_ggx_light_transmission(), bxdf_ggx_perceived_roughness_transmission(), cos_theta(), dot(), ThicknessIsect::hit_N, L, ClosureLight::N, eevee::LTCData::pack_ltc_lut(), R, refract(), Thickness::shape_intersect(), ClosureLight::type, V, and Thickness::value().
Referenced by bxdf_ggx_light_transmission(), and closure_light_new_ex().
| LightProbeRay bxdf_ggx_lightprobe_reflection | ( | ClosureReflection | cl, |
| float3 | V ) |
Definition at line 363 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_dominant_direction_reflection(), bxdf_ggx_lightprobe_reflection(), LightProbeRay::dominant_direction, LightProbeRay::perceptual_roughness, and V.
Referenced by bxdf_ggx_lightprobe_reflection(), and bxdf_lightprobe_ray().
| LightProbeRay bxdf_ggx_lightprobe_thin_glass_transmission | ( | ClosureThinRefraction | cl, |
| float3 | V ) |
Definition at line 381 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_dominant_direction_reflection(), bxdf_ggx_lightprobe_thin_glass_transmission(), LightProbeRay::dominant_direction, LightProbeRay::perceptual_roughness, reflect, and V.
Referenced by bxdf_ggx_lightprobe_thin_glass_transmission(), and bxdf_lightprobe_ray().
| LightProbeRay bxdf_ggx_lightprobe_transmission | ( | ClosureRefraction | cl, |
| float3 | V, | ||
| Thickness | thickness ) |
Definition at line 372 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_dominant_direction_transmission(), bxdf_ggx_lightprobe_transmission(), bxdf_ggx_perceived_roughness_transmission(), LightProbeRay::dominant_direction, LightProbeRay::perceptual_roughness, V, and Thickness::value().
Referenced by bxdf_ggx_lightprobe_transmission(), and bxdf_lightprobe_ray().
roughness is expected to be the linear (from UI) roughness.
Definition at line 312 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_perceived_roughness_reflection().
Referenced by bxdf_ggx_perceived_roughness_reflection(), and closure_apparent_roughness_get().
Return the equivalent reflective roughness resulting in a similar lobe. roughness is expected to be the linear (from UI) roughness.
Definition at line 321 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_perceived_roughness_transmission(), saturate, and sqrt_fast().
Referenced by bxdf_ggx_context_amend_transmission(), bxdf_ggx_light_transmission(), bxdf_ggx_lightprobe_transmission(), bxdf_ggx_perceived_roughness_transmission(), bxdf_ggx_ray_amend_transmission(), and closure_apparent_roughness_get().
| Ray bxdf_ggx_ray_amend_transmission | ( | ClosureUndetermined | cl, |
| float3 | V, | ||
| Ray | ray, | ||
| Thickness | thickness ) |
Definition at line 402 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_dominant_direction_transmission(), bxdf_ggx_perceived_roughness_transmission(), bxdf_ggx_ray_amend_transmission(), ThicknessIsect::hit_P, L, Ray::origin, Thickness::shape_intersect(), V, and Thickness::value().
Referenced by bxdf_ggx_ray_amend_transmission(), and raytrace_thickness_ray_amend().
| BsdfSample bxdf_ggx_sample_reflection | ( | float3 | rand, |
| float3 | Vt, | ||
| float | alpha, | ||
| bool | do_clamp ) |
Returns a tangent space reflection direction following the GGX distribution.
| rand | random point on the unit cylinder (result of sample_cylinder). The Z component can be biased towards 1. |
| Vt | View vector in tangent space. |
| alpha | roughness parameter. |
| do_clamp | clamp for numerical stability during ray tracing. |
Definition at line 52 of file eevee_bxdf_microfacet.bsl.hh.
References BSDF_ROUGHNESS_THRESHOLD, bxdf_ggx_D(), bxdf_ggx_sample_reflection(), cos_theta(), D, BsdfSample::direction, length(), length_squared(), max, mix, normalize, normalize_and_get_length(), BsdfSample::pdf, reflect, saturate, sin_theta(), sqrt, square(), float3::x, and float3::z.
Referenced by bxdf_ggx_sample_reflection(), eevee::lut::GGXBrdfClosure::eval(), eevee::lut::GGXBsdfClosure::eval(), and eevee::ray_generate_direction().
| BsdfSample bxdf_ggx_sample_refraction | ( | float3 | rand, |
| float3 | Vt, | ||
| float | alpha, | ||
| float | ior, | ||
| Thickness | thickness, | ||
| const bool | do_clamp ) |
Returns a tangent space refraction direction following the GGX distribution.
| rand | random point on the unit cylinder (result of sample_cylinder). The Z component can be biased towards 1. |
| Vt | View vector in tangent space. |
| alpha | roughness parameter |
| ior | refractive index of the material. |
| do_clamp | clamp for numerical stability during ray tracing. |
Definition at line 204 of file eevee_bxdf_microfacet.bsl.hh.
References abs, BSDF_ROUGHNESS_THRESHOLD, bxdf_ggx_D(), bxdf_ggx_sample_refraction(), bxdf_ggx_sample_vndf(), D, BsdfSample::direction, dot(), BsdfSample::pdf, refract(), saturate, square(), Thickness::value(), and float3::z.
Referenced by bxdf_ggx_sample_refraction(), eevee::lut::GGXBsdfClosure::eval(), eevee::lut::GGXBtdfGt1Closure::eval(), and eevee::ray_generate_direction().
Definition at line 172 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_sample_vndf(), cos_theta(), max, mix, normalize, saturate, sin_theta(), sqrt, square(), float3::x, and float3::z.
Referenced by bxdf_ggx_sample_refraction(), and bxdf_ggx_sample_vndf().
Definition at line 27 of file eevee_bxdf_microfacet.bsl.hh.
References bxdf_ggx_smith_G1(), sqrt, and square().
Referenced by bxdf_ggx_eval_reflection(), bxdf_ggx_eval_refraction(), and bxdf_ggx_smith_G1().