acron.shading

BrdfLuts

The split-sum DFG lookup table of the PBR shader, generated on the CPU.

IblEnvironment

The image-based light of the PBR shader: an environment's radiance, prefiltered for GGX, and its irradiance as spherical harmonics.

LightUnits

The photometric convention of the PBR shader, and helpers to follow it.

LightingContext

What lights a PBR surface besides Acron's lights: the code behind the fixed contract pbr.frag calls (ctx_begin, ctx_key_light, ctx_irradiance, ctx_radiance, ctx_ambient_visibility, ctx_finish, ctx_write_outputs; see the module manual), the defines and named sources it is compiled with, and the shader inputs it reads.

PbrFeatureKey

What one PBR shader permutation does: the part of a RenderState (and of the generator's options) that changes the GLSL, as opposed to the values that reach it as uniforms.

PbrMaterial

The parameters of a physically based surface, shaped after glTF 2.0's metallic-roughness model and its KHR_materials_ior, KHR_materials_specular, KHR_materials_emissive_strength and KHR_materials_unlit extensions.

PbrMaterialAttrib

Puts a PbrMaterial on a node: np.set_attrib(PbrMaterialAttrib.make(m)).

PbrPipeline

The smallest complete PBR frame, for a game without the frame pipeline: the scene drawn by PbrShaderGenerator into a half-float buffer that follows the window's size, then a full-screen pass that tonemaps it, encodes it as sRGB (unless the window's framebuffer does) and dithers.

PbrShaderBuilder

Turns a RenderState into a PBR shader, without GL: the analysis (make_key), the GLSL (get_vertex_source, get_fragment_source()), the Shader (make_shader: Acron compiles GLSL to SPIR-V on the CPU) and the ShaderAttrib that carries it with its inputs (make_attrib).

PbrShaderGenerator

A ShaderGenerator that writes PBR shaders: install it on a GSG and turn the shader generator on for a subtree, and every state under it gets the shader for its PbrFeatureKey:

PhysicalCamera

The exposure of a physical camera: aperture (f-number N), shutter time t in seconds and sensitivity S (ISO), after Lagarde and de Rousiers, "Moving Frostbite to PBR" (SIGGRAPH 2014), section 5.1:

ShaderLibrary

Named GLSL sources, and the #include resolver that assembles them.

Global Functions