Abstract
Game engines such as Unity and Unreal Engine have become popular tools for creating perceptual and behavioral experiments in complex, interactive environments. They are often used with flat-panel displays, and also with head-mounted displays. Here, I describe and test a mathematical model of luminance and color in Unity's High-Definition Render Pipeline (HDRP). I show that the HDRP has several non-obvious features, such as nonlinearities applied to material properties and rendered values, that must be taken into account to show well-controlled stimuli. I also show how the HDRP can be configured to display gamma-corrected luminance and color, and I provide software to create the specialized files needed for gamma correction.