public static class EnvironmentPrefilterTurns an environment map into the specular half of the split-sum approximation.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The split-sum approximation says that specular reflection of an environment can be separated into two integrals that are each cheap: the environment convolved with the GGX lobe, which depends on roughness and direction, and the BRDF's own response, which depends on roughness and viewing angle and not on the environment at all. The first goes here, one mip level per roughness; the second goes in BrdfLut and is the same texture for every scene ever rendered.
Level zero is the environment itself. Roughness zero is a mirror, and a mirror reflects what is there — so it is copied rather than integrated, which is both faster and exact where importance sampling would only be close.
This is the reference form, and it is slow. Doc 03 asks for a CPU and a compute version of this because reflection probes update at run time; what is here is the CPU one, written to be read and checked rather than to be fast. It samples the source with nearest filtering inside one face, so a high-roughness level wants a high sample count to stay smooth — the saving grace being that high-roughness levels are the small ones.
Fields and properties (1)
public const int DefaultSamplesHow many samples a level takes unless the caller says otherwise.
Methods (2)
public static TextureData Specular(TextureData cube, int levelCount = 0, int samples = 128)Convolves an environment with the GGX lobe, one mip level per roughness.
public static float RoughnessOf(int level, int levelCount)What roughness a prefiltered level stands for.
Used by (2)
- BrdfLutVixen.Core.Imaging
- IblTestsVixen.Core.Imaging.Tests