About
Projects
Graphics
GLFW
NX
SDL2
GLOP
2D
3D
Models
Physics
Input
User Data
Misc
Data Serialisation
Type Information & Reasoning
Utilities
Extensions
About
Projects
Graphics
GLFW
NX
SDL2
GLOP
2D
3D
Models
Physics
Input
User Data
Misc
Data Serialisation
Type Information & Reasoning
Utilities
Extensions
Trial provides a standard renderer that implements a Physically Based Rendering shading model and associated material. To use it, simply enter a pbr-render-pass and ensure your objects provide a pbr-material, or some appropriate conversion exists.
The model uses a Cook-Torrance BRDF to implement the shading behaviour, and it is recommended to use it in combination with an HDR pipeline.
Each material has the following properties:
Albedo
This is put together through the albedo-texture and the albedo-factor, both of which are 4-component. The alpha component allows you to make semi-transparent materials.
Metalness, Roughness, Ambient Occlusion
This is put together through the metal-rough-occlusion-texture and the metalness-factor, roughness-factor and occlusion-factor. You may also specify the textures individually through the metal-rough-texture or metalness-texture, roughness-texture, and occlusion-texture. If you specify them individually, they will be merged manually before upload, which may be expensive.
Emission
The emission-texture and emission-factor allow you to create materials that appear to emit light. In practise this will just cause the material to be very bright, causing bloom to take hold. This only works in combination with an HDR pipeline.
Normal
The normal-texture provides the standard normal mapping behaviour.
Alpha-Cutoff
The alpha-cutoff designates a threshold below which the material is considered fully transparent.

The PBR renderer supports an image based lighting workflow. For this purpose it provides a special light type, the environment-light. The light requires an environment-map instance as the :asset initarg, which it uses to get the needed irradiance and prefiltered environment maps.
When the light is active in the scene it will provide ambient lighting for all objects based on the environment map. You can optionally control for its strength via the light's color, which simply acts as a multiplier.


By default the PBR renderer outputs colour in high dynamic range. This will make it look odd, unless you tone map the colours back into low dynamic range. To do so, you should add an instance of a tone-mapping-pass subclass and connect it to the color output of the PBR pass. The following tone mappers are implemented:
hable
Accepts the following tuning parameters:
reinhard-extended
Accepts the following tuning parameters:
schlick
Accepts the following tuning parameters:
tumblin-rushmeier
Accepts the following tuning parameters:
luminance-map
This should be connected to a luminance-pass' output, with the luminance-pass' input being the same as the input to this pass.
uchimura
Accepts the following tuning parameters:
ward
Accepts the following tuning parameters:
All tone mappers also include a gamma factor that should be adjusted according to the user's screen.