Skip to content

Stack/07 world mesh#374

Open
JucanAndreiDaniel wants to merge 9 commits into
mainfrom
stack/07-world-mesh
Open

Stack/07 world mesh#374
JucanAndreiDaniel wants to merge 9 commits into
mainfrom
stack/07-world-mesh

Conversation

@JucanAndreiDaniel

Copy link
Copy Markdown
Contributor

Summary

Rebuilds the world-mesh build pipeline onto MeshDataArray + Burst write jobs, makes chunk slicing texture-aware, and bumps the cache format.

Changes

  • New job/dataWorldMeshWriteJob and WorldMeshChunkData for jobified mesh writes.
  • BuilderWorldMeshBuilder/AbstractMeshBuilder rebuilt: a single GetPolygon sweep caches each chunk's expanded vertex count, writes go through Burst jobs into AllocateWritableMeshData, and the error path does JobHandle.Complete() + Dispose() before rethrowing (no native leak).
  • SlicingWorldChunkCacheCreatorDomain/PreCachingScene slice chunks using the cached TextureArray info; StaticCacheVersion bumped.
  • Shaders — lit shaders updated for the rebuilt mesh layout.

How to test

  • Delete the static cache and pre-cache a world; confirm load completes and chunk count/visuals are correct.
  • Verify world rendering looks the same.
  • spawn at night to see if lights work properly

Single GetPolygon sweep caches the expanded vertex count per chunk, writes go through Burst jobs into AllocateWritableMeshData, with JobHandle.Complete + dispose on the error path.
CalculateWorldChunks now consumes the cached TextureArray info; StaticCacheVersion bumped 4 -> 5 for the new chunk format.
@JucanAndreiDaniel JucanAndreiDaniel self-assigned this Jun 15, 2026
@JucanAndreiDaniel JucanAndreiDaniel marked this pull request as ready for review June 15, 2026 12:52
@JucanAndreiDaniel JucanAndreiDaniel requested a review from JaXt0r June 15, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants