| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
- // All rights reserved.
- // Code licensed under the BSD License.
- // http://www.anki3d.org/LICENSE
- #pragma once
- #include <AnKi/Shaders/Include/Common.h>
- ANKI_BEGIN_NAMESPACE
- struct FrustumGpuVisibilityConsts
- {
- Vec4 m_clipPlanes[6u];
- Vec4 m_maxLodDistances;
- Vec3 m_lodReferencePoint;
- F32 m_padding3;
- Mat4 m_viewProjectionMat;
- Vec2 m_finalRenderTargetSize;
- };
- struct DistanceGpuVisibilityConstants
- {
- Vec3 m_pointOfTest;
- F32 m_testRadius;
- Vec4 m_maxLodDistances;
- Vec3 m_lodReferencePoint;
- F32 m_padding3;
- };
- struct GpuVisibilityNonRenderableConstants
- {
- Vec4 m_clipPlanes[6u];
- };
- struct GpuVisibilityAccelerationStructuresConstants
- {
- Vec4 m_clipPlanes[6u];
- Vec3 m_pointOfTest;
- F32 m_testRadius;
- Vec4 m_maxLodDistances;
- };
- struct GpuVisibilityHash
- {
- U32 m_renderablesHash;
- U32 m_containsDeformable;
- };
- struct GpuVisibilityVisibleRenderableDesc
- {
- U32 m_lod_2bit_renderableIndex_20bit_renderStageBucket_10bit;
- };
- struct GpuVisibilityVisibleMeshletDesc
- {
- U32 m_renderableIndex_30bit_renderStageBucket_12bit;
- U32 m_lod_2bit_meshletIndex_30bit;
- };
- struct GpuVisibilityMeshletConstants
- {
- Mat4 m_viewProjectionMatrix;
- Vec3 m_cameraPos;
- U32 m_padding1;
- Vec2 m_viewportSizef;
- UVec2 m_padding2;
- };
- enum class GpuVisibilityCounter : U32
- {
- kVisibleRenderableCount,
- kMeshletsSurvivingStage1Count,
- kThreadgroupCount,
- kMeshletsCulledByHzbCount,
- kCount
- };
- enum class GpuVisibilityIndirectDispatches : U32
- {
- k2ndStageLegacy,
- k2ndStageMeshlets,
- k3rdStageMeshlets,
- kCount
- };
- /// Counters used in non-renderables visibility
- struct GpuVisibilityNonRenderablesCounters
- {
- U32 m_threadgroupCount; ///< Counts the no of threadgroups
- U32 m_visibleObjectCount; ///< Counts the visible objects
- U32 m_feedbackObjectCount; ///< Counts the visbile objects that need feedback
- };
- ANKI_END_NAMESPACE
|