Define gaussian splat chunk data contract
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <XCEngine/Core/Containers/Array.h>
|
||||
#include <XCEngine/Core/Math/Bounds.h>
|
||||
#include <XCEngine/Core/Math/Quaternion.h>
|
||||
#include <XCEngine/Core/Math/Vector2.h>
|
||||
#include <XCEngine/Core/Math/Vector3.h>
|
||||
#include <XCEngine/Core/Math/Vector4.h>
|
||||
#include <XCEngine/Core/Types.h>
|
||||
@@ -45,6 +46,7 @@ enum class GaussianSplatSectionFormat : Core::uint32 {
|
||||
constexpr Core::uint32 kGaussianSplatSHCoefficientCount = 45;
|
||||
constexpr Core::uint32 kGaussianSplatSHColorChannelCount = 3;
|
||||
constexpr Core::uint32 kGaussianSplatMaxSHOrder = 3;
|
||||
constexpr Core::uint32 kGaussianSplatChunkSize = 256;
|
||||
|
||||
Core::uint32 ResolveGaussianSplatSHOrderFromCoefficientCount(Core::uint32 coefficientCount);
|
||||
Core::uint32 ResolveGaussianSplatSHOrderFromSectionStride(Core::uint32 elementStride);
|
||||
@@ -67,6 +69,24 @@ struct GaussianSplatSHRecord {
|
||||
float coefficients[kGaussianSplatSHCoefficientCount] = {};
|
||||
};
|
||||
|
||||
struct GaussianSplatChunkRecord {
|
||||
Core::uint32 colR = 0u;
|
||||
Core::uint32 colG = 0u;
|
||||
Core::uint32 colB = 0u;
|
||||
Core::uint32 colA = 0u;
|
||||
Math::Vector2 posX = Math::Vector2::Zero();
|
||||
Math::Vector2 posY = Math::Vector2::Zero();
|
||||
Math::Vector2 posZ = Math::Vector2::Zero();
|
||||
Core::uint32 sclX = 0u;
|
||||
Core::uint32 sclY = 0u;
|
||||
Core::uint32 sclZ = 0u;
|
||||
Core::uint32 shR = 0u;
|
||||
Core::uint32 shG = 0u;
|
||||
Core::uint32 shB = 0u;
|
||||
};
|
||||
|
||||
static_assert(sizeof(GaussianSplatChunkRecord) == 64u, "GaussianSplatChunkRecord layout must stay Unity-compatible");
|
||||
|
||||
struct GaussianSplatSection {
|
||||
GaussianSplatSectionType type = GaussianSplatSectionType::Unknown;
|
||||
GaussianSplatSectionFormat format = GaussianSplatSectionFormat::Unknown;
|
||||
|
||||
Reference in New Issue
Block a user