Skip to main content

raygeo.image.pbr

Functions

generate_brdf_lut()

generate_brdf_lut(
size: int = 32,
sample_count: int = 1024,
) -> numpy.NDArray[numpy.float32]

Integrate the Cook-Torrance BRDF into a split-sum LUT.

For each (NdotV, roughness) texel the GGX distribution is importance-sampled (Hammersley sequence) and the Smith geometry term integrated, giving the Fresnel scale/bias pair such that the specular IBL response is F0 * scale + bias.

Deterministic: repeated calls return identical data.

ParameterTypeDescription
sizeint = 32LUT resolution in both axes.
sample_countint = 1024Importance samples per texel.
Returnsnumpy.NDArray[numpy.float32]Float32 array of shape (size, size, 2) indexed as lut[roughness, NdotV] = (scale, bias).
ComplexityO(size^2 * sample_count)

Split-sum BRDF integration LUT for IBL specular

Split-sum BRDF integration LUT for IBL specular