Commit Graph
3 Commits
Author SHA1 Message Date
西风逍遥游 913a4aad01 feat(voxel): implement CubeType and CubeTypeRegistry for enhanced voxel type management
- Introduced CubeType to define block properties including texture mappings and orientation.
- Added CubeTypeRegistry for managing block types, including methods for adding and loading from JSON.
- Updated Voxel and VoxelWorld classes to utilize the new registry for voxel management.
- Enhanced GreedyMesher to resolve face textures based on the CubeTypeRegistry.
- Refactored existing methods to support the new block type system, ensuring backward compatibility with previous voxel ID handling.
- Added comprehensive tests for the new functionality, including multi-texture support and block type resolution.
- Updated documentation to reflect changes in voxel management and block type registration.
2026-08-13 23:49:07 +08:00
西风逍遥游 36ff16f6ce fix(graphics): update clear color handling and face winding for 3D rendering
- Adjusted the clear color in the 3D frame to use the background color instead of a stale 2D clear.
- Updated the front face winding in the voxel rect pipeline to counter-clockwise to align with Vulkan's framebuffer requirements.
- Added comments for clarity on the changes made to the clear color and face winding logic.
2026-08-13 11:57:13 +08:00
西风逍遥游andCursor Agent 14b88634ac test(voxel): expand render coverage and fix face winding (#49)
* test(voxel): expand render coverage and fix face winding

Add shader-mirror decode helpers, broader CPU cull/meshing tests, and
GPU pixel-readback cases for drawVisible / drawVoxelFaceInstances.
Correct unit-quad indices so outward faces are front-facing.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(voxel): add more CPU and GPU render cases

Expand coverage for remesh/dirty, negative chunks, greedy edge shapes,
viewRange edge cases, decode planes, meshVoxels API, and GPU paths
(begin3DFrame, aliases, atlas tiles, far origins, orbit faces, remesh).

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* docs(voxel): refresh test coverage notes

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(voxel): more edge-case CPU and GPU render coverage

Add OOB/empty packed data, stripe/ring merges, pack masking, multi-chunk
visibility, seam faces, meshVoxels errors, and GPU cases for empty world,
aliases, batch growth, atlas blue tile, side walls, and culled clear.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(voxel): expand coverage to 88 CPU and 42 GPU cases

Add second-triangle winding helper, greedy/world/decode edge cases,
and more GPU pixel-readback scenarios (face aliases, range cull, orbits).

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(voxel): multi-tile atlas and multi-texture coverage

Add 4×4/8×8/16×8 atlas helpers and GPU sampling for many tex indices,
plus CPU UV-grid and greedy/world tests that keep distinct textures.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(voxel): more geometry, visibility, and render edge cases

Grow CPU coverage to 114 cases (corners, merges, shell, frustum,
selectVisible replace) and GPU to 64 (aliases, wide/tall rects,
frustum cull, carve, multi-chunk atlas colors).

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

* test(voxel): more cases after merging main

Sync with origin/main, then grow coverage to 129 CPU and 74 GPU
tests (range filter, aliases, null atlas/packed, remesh, atlases).

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-13 11:29:24 +08:00