perf(render): consume prepared mesh package at runtime

This commit is contained in:
Erik 2026-07-24 15:07:25 +02:00
parent c42f93b323
commit f05afc07c1
22 changed files with 328 additions and 370 deletions

View file

@ -168,6 +168,7 @@ public static class ObjectMeshDataSerializer {
WriteNullableInt32Enum(w, batch.UploadPixelType.HasValue, batch.UploadPixelType is { } upt ? (int)upt : 0);
WriteUInt16List(w, batch.Indices);
w.Write((int)batch.CullMode);
w.Write((int)batch.Translucency);
w.Write(batch.IsTransparent);
w.Write(batch.IsAdditive);
w.Write(batch.HasWrappingUVs);
@ -182,6 +183,8 @@ public static class ObjectMeshDataSerializer {
batch.UploadPixelType = ReadNullableInt32Enum(r, v => (UploadPixelType)v);
batch.Indices = ReadUInt16List(r);
batch.CullMode = (CullMode)r.ReadInt32();
batch.Translucency =
(AcDream.Core.Meshing.TranslucencyKind)r.ReadInt32();
batch.IsTransparent = r.ReadBoolean();
batch.IsAdditive = r.ReadBoolean();
batch.HasWrappingUVs = r.ReadBoolean();

View file

@ -18,10 +18,12 @@ public static class PakFormat {
/// <summary>
/// Identity of the bake algorithm that produced the payloads. Version 2
/// introduces content-identity EnvCell blobs with ordinary TOC aliases.
/// introduced content-identity EnvCell blobs with ordinary TOC aliases;
/// version 3 embeds exact render-pass translucency in each texture batch
/// so production never rebuilds surface metadata from live DAT.
/// The binary format remains version 1.
/// </summary>
public const uint CurrentBakeToolVersion = 2;
public const uint CurrentBakeToolVersion = 3;
}
/// <summary>