52 float NV =
clamp(1.0f -
square(coords.
y), 1e-4f, 0.9999f);
82 brdf.
scale = (1.0f - s) * weight;
83 brdf.
bias = s * weight;
125 coords.
y = coords.
y * 2.0f - 1.0f;
126 coords.
y *= (coords.
y > 0.0f) ? (1.0f - critical_cos) : critical_cos;
129 coords.
y += critical_cos;
131 float NV =
clamp(coords.
y, 1e-4f, 0.9999f);
157 bsdf.
scale = (1.0f - s) * weight;
158 bsdf.
bias = s * weight;
209 float ior = (1.0f + F0) / (1.0f - F0);
211 float NV =
clamp(1.0f -
square(coords.
y), 1e-4f, 0.9999f);
260 float thickness = coords.
x * SSS_TRANSMIT_LUT_RADIUS;
274 return float4(profile, 0.0f);
283 float thickness = coords.
x * SSS_TRANSMIT_LUT_RADIUS;
299 return float4(profile, 0.0f);
310 constexpr uint sample_count = 512u * 512u;
317 for (uint i = 1u; i <= sample_count; i++) {
323 measure += func.eval(Xi).pack();
325 return measure /
float(sample_count);
345 switch (uint(
lut.type)) {
346 case LUT_GGX_BRDF_SPLIT_SUM:
349 case LUT_GGX_BSDF_SPLIT_SUM:
352 case LUT_GGX_BTDF_IOR_GT_ONE:
355 case LUT_BURLEY_SSS_PROFILE:
358 case LUT_RANDOM_WALK_SSS_PROFILE:
BsdfSample bxdf_ggx_sample_refraction(float3 rand, float3 Vt, float alpha, float ior, Thickness thickness, const bool do_clamp)
BsdfEval bxdf_ggx_eval_refraction(float3 N, float3 L, float3 V, float alpha, float ior, Thickness thickness, const bool do_clamp)
BsdfEval bxdf_ggx_eval_reflection(float3 N, float3 L, float3 V, float alpha, bool do_clamp)
BsdfSample bxdf_ggx_sample_reflection(float3 rand, float3 Vt, float alpha, bool do_clamp)
#define LUT_WORKGROUP_SIZE
float3 sample_cylinder(float2 rand)
#define global_invocation_id
VecBase< T, D > refract(VecOp< T, D >, VecOp< T, D >, float) RET
VecBase< float, D > normalize(VecOp< float, D >) RET
float dot(VecOp< float, D >, VecOp< float, D >) RET
constexpr T clamp(T, U, U) RET
ImageBase< float, 3 > image3D
IMG_TEMPLATE void imageStore(T &, IntCoord, DataVec)
float3x3 scale(float3x3 mat, float2 scale)
void comp_main(const uint3 global_id, LUT &lut)
float4 integrate(const F &func)
float4 burley_sss_translucency(float3 coords)
float4 random_walk_sss_translucency(float3 coords)
PipelineCompute comp(comp_main)
float2 hammersley_2d(T i, T sample_count)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
GGXBrdfData eval(float3 Xi) const
static GGXBrdfClosure from_coords(float3 coords)
GGXBsdfData eval(float3 Xi) const
static GGXBsdfClosure from_coords(float3 coords)
float transmission_factor
static GGXBtdfGt1Closure from_coords(float3 coords)
GGXBtdfGt1Data eval(float3 Xi) const
float transmission_factor