struct

FDepthConvention

The scene depth convention, once. Standard depth maps near to 0 and far to 1; reverse-Z maps near to 1 and far to 0. Everything that builds a scene projection, clears scene depth or picks a scene depth compare derives from this, and the shaders derive theirs from MOWO_REVERSE_Z in Engine/Shaders/Public/MowoDepth.hlsli: the two must change together. Shadow-map depth keeps the standard convention and does not use these.

Module
Math
Header
#include "Math/DepthConvention.h"
Namespace
Mowo

Properties

TypeNameDescription
static constexpr boolkReverseZDefault true.
static constexpr floatkClearValueDefault kReverseZ ? 0.0f : 1.0f.
static constexpr floatkNearValueDefault kReverseZ ? 1.0f : 0.0f.
static constexpr floatkFarValueDefault kClearValue.
static constexpr floatkFarInfinityDefault kReverseZ ? -1e30f : 1e30f.

Public functions

ReturnsNameDescription
boolIsCloser
floatNearest
floatFarthest
voidExtractNearFar
boolBehind

Function details

IsCloser

C++
static constexpr bool IsCloser(float a, float b)

Nearest

C++
static constexpr float Nearest(float a, float b)

Farthest

C++
static constexpr float Farthest(float a, float b)

ExtractNearFar

C++
static void ExtractNearFar(float m22, float m23, float& outNear, float& outFar)

Behind

C++
static constexpr bool Behind(float a, float b, float bias)
Generated from Math/DepthConvention.h via math.json · Dec 4, 2026Version 1.1.0