Tools/VoxelForgeTest.ps1 runs scenarios (canonical, owner, probe, perf, tests, parity) with the known-good flag sets, isolated user/config dirs, serialized launches, an owner-process guard, and a compact result.json + summary.txt instead of 300 MB logs that Codex has to stream. Answers the owner's question 'can the commandlet reflect in-game behaviour': -gameconfig=1 makes the commandlet use the authored settings, and the parity scenario compares per-tile geometry hashes between the commandlet export and the game's streaming path. Parity PASS: 64 commandlet tiles vs 810 game records, no differing tile. First run of the tests scenario: 44 tests, 28 pass, 16 fail (8 composer, 6 op-stack equivalence, PassageLandsInOpenSpace, StrateParamBlendCoverage). Triage is the next round: stale expectations from the floor removal and the degrees change, versus real defects, especially the legacy-vs-op-stack equivalence ones. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
60 lines
1.9 KiB
C++
60 lines
1.9 KiB
C++
// VoxelGeometryHash.h
|
|
// The compact geometry identity shared by offline export and runtime streaming diagnostics.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Misc/Crc.h"
|
|
#include "VoxelTypes.h"
|
|
|
|
namespace VoxelForgeGeometryHash
|
|
{
|
|
// Keep this deliberately identical to the historical explorer hash. It is a cheap,
|
|
// deterministic identity for a tile's complete mesh payload; changing it would invalidate
|
|
// the commandlet's existing canonical evidence.
|
|
inline FString Compute(const FVoxelMeshData& MeshData)
|
|
{
|
|
uint32 Crc = 0;
|
|
const int32 Counts[] = {
|
|
MeshData.Vertices.Num(),
|
|
MeshData.Normals.Num(),
|
|
MeshData.UVs.Num(),
|
|
MeshData.Colors.Num(),
|
|
MeshData.Triangles.Num(),
|
|
MeshData.NumCeilingTriangles,
|
|
};
|
|
Crc = FCrc::MemCrc32(Counts, sizeof(Counts), Crc);
|
|
if (MeshData.Vertices.Num() > 0)
|
|
{
|
|
Crc = FCrc::MemCrc32(
|
|
MeshData.Vertices.GetData(),
|
|
MeshData.Vertices.Num() * sizeof(FVector), Crc);
|
|
}
|
|
if (MeshData.Normals.Num() > 0)
|
|
{
|
|
Crc = FCrc::MemCrc32(
|
|
MeshData.Normals.GetData(),
|
|
MeshData.Normals.Num() * sizeof(FVector), Crc);
|
|
}
|
|
if (MeshData.UVs.Num() > 0)
|
|
{
|
|
Crc = FCrc::MemCrc32(
|
|
MeshData.UVs.GetData(),
|
|
MeshData.UVs.Num() * sizeof(FVector2D), Crc);
|
|
}
|
|
if (MeshData.Colors.Num() > 0)
|
|
{
|
|
Crc = FCrc::MemCrc32(
|
|
MeshData.Colors.GetData(),
|
|
MeshData.Colors.Num() * sizeof(FColor), Crc);
|
|
}
|
|
if (MeshData.Triangles.Num() > 0)
|
|
{
|
|
Crc = FCrc::MemCrc32(
|
|
MeshData.Triangles.GetData(),
|
|
MeshData.Triangles.Num() * sizeof(int32), Crc);
|
|
}
|
|
return FString::Printf(TEXT("%08X"), Crc);
|
|
}
|
|
}
|