Skip to content

Render cube map textures on box geoms#23

Merged
kevinzakka merged 1 commit into
mainfrom
cube-texture-fix
Jun 10, 2026
Merged

Render cube map textures on box geoms#23
kevinzakka merged 1 commit into
mainfrom
cube-texture-fix

Conversation

@kevinzakka

@kevinzakka kevinzakka commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Box geoms with a cube map material were drawn as a flat-colored box, so per-face cube textures did not show up in the viewer. This builds a 6-quad textured mesh from a vertical-strip atlas for such boxes so each face's image displays, and groups cube-textured boxes by texture so they merge correctly.

The cube-map validation and face-axis array that were duplicated across the existing mesh path and the new box path are now shared helpers. Added tests covering mesh structure, extents, per-face order and placement, the flat-color fallback for plain and 2D-textured boxes, and texture grouping.

Before After
before after

Box geoms with a cube map material were drawn as a flat-colored box. Build a
6-quad textured mesh from a vertical-strip atlas so per-face textures display,
and group such boxes by texture so they merge correctly.
@kevinzakka kevinzakka merged commit 1c32763 into main Jun 10, 2026
7 checks passed
@kevinzakka kevinzakka deleted the cube-texture-fix branch June 10, 2026 20:05
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.

1 participant