Skip to content

Stack/07 world mesh#374

Merged
JucanAndreiDaniel merged 10 commits into
mainfrom
stack/07-world-mesh
Jun 18, 2026
Merged

Stack/07 world mesh#374
JucanAndreiDaniel merged 10 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

@JaXt0r JaXt0r left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loaded super fast. :-)

@JucanAndreiDaniel JucanAndreiDaniel merged commit c378927 into main Jun 18, 2026
@JucanAndreiDaniel JucanAndreiDaniel deleted the stack/07-world-mesh branch June 18, 2026 02:48
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.

3 participants