Skip to content

Support nearest-neighbor image textures on all backends - #85

Merged
treeform merged 2 commits into
masterfrom
feat/nearest-image-texture-sampling
Dec 3, 2026
Merged

treeform merged 2 commits into
masterfrom
feat/nearest-image-texture-sampling

Conversation

@treeform

@treeform treeform commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

Changes

Expose allocateTexture(width, height, nearest = true) through the public Silky API on OpenGL, WebGL, Metal, DirectX 12, Vulkan, and CPU. Linear sampling remains the default for independent images.

Metal selects the sampler per texture batch. DirectX 12 and Vulkan now allocate, upload, draw, and release independent textures through their native APIs. The CPU drawer samples independent images in software. Texture batches preserve draw order, and the atlas keeps its existing sampling behavior.

Verification

  • CPU and offscreen Metal pixel tests passed for nearest and linear sampling.
  • OpenGL on macOS and Linux, WebGL 2, CPU, Metal, and the semantic API passed nim check.
  • DirectX 12 and Vulkan passed Windows-targeted nim check with the checked-in shaders. Native Windows rendering remains to be exercised.

@treeform treeform changed the title Allow nearest-neighbor sampling on independent OpenGL textures Support nearest-neighbor image textures on all backends Dec 3, 2026
@treeform
treeform merged commit a84171e into master Dec 3, 2026
8 checks passed
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