INNER CODE UNIT · Python

specular

SedulousWorks/SedulousEngine · Scripts/generate_brdf_lut.py:19

    specular = prefilteredColor * (F0 * lut.r + lut.g)

Algorithm: GGX importance sampling (Hammersley sequence), NUM_SAMPLES per
texel. Faithful port of the old engine's SkyFeature.GenerateBRDFLut().

To regenerate: edit constants below, run, commit the resulting .bf.
"""

import numpy as np
import os
import struct
import sys
import time

# 256 matches Unity's default and is visually identical to 512 for a smooth
# LUT. Keeps the embedded array at ~256 KB raw (~1.3 MB as hex source).
SIZE = 256
NUM_SAMPLES = 1024

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…