Allows to setup near/far offsets (margins), rendered geometry elevation relative to sea level as also minimum near plane and maximum far plane distance constraints.
defines near plane offset from the ground in the surface normal direction, positive values allows to render elevated terrain features (mountains, buildings). Defaults to Burj Khalifa building height.
defines far plane offset from the ground surface, negative values moves far plane below the ground level (use it to render depressions). Default zero - sea level.
minimum allowable near plane distance from camera, must be bigger than zero.
minimum distance between near and far plane, as a ratio of average near/far plane distance, it have to be significantly bigger than zero (especially if [[maxElevation]] and [[minElevation]] are equal), otherwise you may notice flickering when rendering, or even render empty scene if frustum planes are almost equal.
maximum ratio between ground and far plane distance, allows to limit viewing distance at overall. Have to be bigger than 1.0.
It is strongly recommended to set some reasonable [[nearFarMargin]] (offset) between near and far planes to avoid flickering.
Keep in mind that this evaluator does not evaluate terrain (or building) elevation automatically, to keep such features rendered (between frustum planes) use [[minElevation]], [[maxElevation]] constraints. You may change this parameters at any time, but it requires repeating [[evaluatePlanes]] step, if your camera is moving you need to evaluate planes anyway.
You may treat [[minElevation]] and [[maxElevation]] parameters as the maximum and minimum renderable elevation respectively along the surface normal, when camera is constantly looking downwards (top-down view). If you need ClipPlanesEvaluator for cameras that support tilt or yaw please use TiltViewClipPlanesEvaluator.
[[nearFarMaxRatio]] does not limit far plane when spherical projection is in use, the algorithm used there estimates distance to point on tangent where line from camera touches the sphere horizon and there is no reason to clamp it.
Readonly
farmaximum ratio between ground and far plane distance, allows to limit viewing distance at overall. Have to be bigger than 1.0.
Protected
m_Helper object for reducing performance impact.
Protected
m_Helper for reducing number of objects created at runtime.
Readonly
nearminimum distance between near and far plane, as a ratio of average near/far plane distance, it have to be significantly bigger than zero (especially if [[maxElevation]] and [[minElevation]] are equal), otherwise you may notice flickering when rendering, or even render empty scene if frustum planes are almost equal.
Readonly
nearminimum allowable near plane distance from camera, must be bigger than zero.
Get maximum elevation to be covered by camera frustum.
Set maximum elevation above sea level to be rendered.
the elevation (altitude) value in world units (meters).
If you set this exactly to the maximum rendered feature height (altitude above the sea, you may notice some flickering or even polygons disappearing related to rounding errors or depth buffer precision. In such cases increase [[nearFarMargin]] or add a little bit offset to your assumed maximum elevation.
Reasonable values are in between (-DeadSeeDepression, MtEverestHeight>, both values are defined in [[EarthConstant]] as [[EarthConstant.MIN_ELEVATION]] and [[EarthConstant.MAX_ELEVATION]] respectively.
minElevation for more information about precision and rounding errors.
Get minimum elevation to be covered by camera frustum.
Set minimum elevation to be rendered, values beneath the sea level are negative.
the minimum elevation (depression) in world units (meters).
If you set this parameter to zero you may not see any features rendered if they are just below the sea level more than half of [[nearFarMargin]] assumed. Similarly if set to -100m and rendered features lays exactly in such depression, you may notice that problem. The errors usually come from projection precision loss and depth buffer nature (significant precision loss closer to far plane). Thus is such cases either increase the margin (if you are sure features are just at this elevation, or setup bigger offset for [[minElevation]]. Reasonable values are between <-DeadSeaDepression, MtEverestHeight), where the first denotes lowest depression on the Earth defined as [[EarthConstants.MIN_ELEVATION]] and the second is the highest point our planet.
https://developer.nvidia.com/content/depth-precision-visualized
Protected
minimumGet minimum view range that is possible to achieve with current evaluator settings.
This value will not change after evaluator is constructed.
Optional
elevationProvider: ElevationProviderProtected
evaluateOptional
elevationProvider: ElevationProviderProtected
evaluateOptional
elevationProvider: ElevationProviderProtected
getGenerated using TypeDoc
Evaluates camera clipping planes taking into account ground distance and camera tilt (pitch) angle (angle between look-at vector and ground surface normal).