diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-09-16 23:11:56 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-09-16 23:11:56 +0000 |
| commit | 0cc841bc76eda21793f2a158b0ededad5a5ae3bf (patch) | |
| tree | 39e1f2bee602263336754d990eaab557f16b98d6 /Common/interface | |
| parent | Another improvement to texture format tests in OpenGL (diff) | |
| download | DiligentCore-0cc841bc76eda21793f2a158b0ededad5a5ae3bf.tar.gz DiligentCore-0cc841bc76eda21793f2a158b0ededad5a5ae3bf.zip | |
Added GPU vendor and memory size detection (API 240071), closed https://github.com/DiligentGraphics/DiligentCore/issues/144.
Fixed shader model selection in D3D12 backend
Diffstat (limited to 'Common/interface')
| -rw-r--r-- | Common/interface/AdvancedMath.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Common/interface/AdvancedMath.hpp b/Common/interface/AdvancedMath.hpp index b48da1bc..8d1119e5 100644 --- a/Common/interface/AdvancedMath.hpp +++ b/Common/interface/AdvancedMath.hpp @@ -88,6 +88,14 @@ struct ViewFrustumExt : public ViewFrustum // For OpenGL, matrix is still considered row-major. The only difference is that // near clip plane is at -1, not 0. +// +// Note that returned plane normal vectors are not normalized, which does not make a difference +// when testing a point against the plane: +// +// IsPointInsidePlane = dot(Plane.Normal, Point) < Plane.Distance +// +// However, to use the planes with other distances (e.g. for testing a sphere against the plane), +// the normal vectors must be normalized and the distances scaled accordingly. inline void ExtractViewFrustumPlanesFromMatrix(const float4x4& Matrix, ViewFrustum& Frustum, bool bIsOpenGL) { // For more details, see Gribb G., Hartmann K., "Fast Extraction of Viewing Frustum Planes from the |
