lovr.graphics.isHDR

Edit

Returns whether the super experimental HDR mode is active.

To enable HDR, add t.graphics.hdr to lovr.conf. When enabled, LÖVR will try to create an HDR10 window. If the GPU supports it, then this function will return true and the window texture will be HDR:

For now, it's up to you to write PQ-encoded Rec.2020 color data from your shader when rendering to the window.

hdr = lovr.graphics.isHDR()

Arguments

None

Returns

NameTypeDescription
hdrboolean Whether HDR is enabled.

Notes

The following shader helper functions make it easier to convert between sRGB colors and HDR10:

vec3 pqToLinear(vec3 color);
vec3 linearToPQ(vec3 color);
vec3 sRGBToRec2020(vec3 color);
vec3 rec2020ToSRGB(vec3 color);

See also