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
| Type | Name | Description |
|---|---|---|
static constexpr bool | kReverseZ | Default true. |
static constexpr float | kClearValue | Default kReverseZ ? 0.0f : 1.0f. |
static constexpr float | kNearValue | Default kReverseZ ? 1.0f : 0.0f. |
static constexpr float | kFarValue | Default kClearValue. |
static constexpr float | kFarInfinity | Default kReverseZ ? -1e30f : 1e30f. |
Public functions
| Returns | Name | Description |
|---|---|---|
bool | IsCloser | |
float | Nearest | |
float | Farthest | |
void | ExtractNearFar | |
bool | Behind |
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