<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/it-s-one-triangle-michael-what-could-it-cost--1ydmxx44m" -->

---
title: It's one triangle, Michael. What could it cost? | daily.dev
description: A developer experienced with the Bevy game engine documents building a minimal graphics stack from scratch using Rust, SDL3, and Vulkan (via the Ash bindings)...
canonical: https://daily.dev/posts/it-s-one-triangle-michael-what-could-it-cost--1ydmxx44m
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: It's one triangle, Michael. What could it cost? | daily.dev
og:description: A developer experienced with the Bevy game engine documents building a minimal graphics stack from scratch using Rust, SDL3, and Vulkan (via the Ash bindings)...
og:url: https://daily.dev/posts/it-s-one-triangle-michael-what-could-it-cost--1ydmxx44m
og:image: https://api.daily.dev/og/posts/1ydmxx44M.png
og:image:alt: It's one triangle, Michael. What could it cost?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# It's one triangle, Michael. What could it cost?

**[chris biscardi](https://daily.dev/sources/chrisbiscardi)** · 19 min read · 1 upvotes · 0 comments

## Summary

A developer experienced with the Bevy game engine documents building a minimal graphics stack from scratch using Rust, SDL3, and Vulkan (via the Ash bindings) instead of Bevy's WebGPU-based approach, deliberately choosing lower-level, less-traveled tools to deepen understanding. The narrative covers setting up the Vulkan SDK, wrestling with MoltenVK on Mac OS for Vulkan-on-Mac support, choosing the Slang shader language over GLSL/HLSL/WGSL, forking unpublished Slang bindings from the Tiny Glade developers, and debugging index buffer and alpha channel issues using Xcode's GPU frame capture until finally rendering two triangles forming a rectangle. It closes with plans to add glTF model loading and non-interleaved vertex attributes.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=KfgW91RSnp4>

## Questions this post answers

### How do you get Vulkan working on Mac OS with Rust?

Vulkan support on Mac OS requires MoltenVK as a compatibility layer since Vulkan does not run natively there. Using the Ash Rust bindings alongside SDL3 (with its ash feature enabled) and the Vulkan SDK, developers must follow extra setup steps documented in MoltenVK's user guide and the Ash examples to create a working surface, and Apple Silicon performs best with three swap chain images instead of two.

_Developers wiring up Vulkan on Apple Silicon can find similar MoltenVK workarounds shared on daily.dev._

### Why choose the Slang shader language over GLSL, HLSL, or WGSL for Vulkan?

Slang was chosen because it extends HLSL with modern language features like modules and reflection, and it compiles to SPIR-V, the intermediate representation Vulkan actually consumes, and ships bundled with the Vulkan SDK. GLSL is considered an older OpenGL-era language, while WGSL and its community superset Weasel were already familiar, making Slang the more interesting unfamiliar option to explore.

_Teams deciding between shader languages for Vulkan pipelines compare trade-offs like these on daily.dev._

### What causes a Vulkan triangle to render with missing colors or a garbled index buffer?

A shared index between two triangles in the index buffer, combined with an accidentally set alpha channel write mask, can cause vertices to render without visible color and produce out-of-bounds index reads. Xcode's GPU frame capture tool revealed both issues on Mac, showing the vertices existed but weren't displaying color due to the RGBA output mask misconfiguration.

_Graphics programmers debugging similar Vulkan rendering glitches track fixes like these on daily.dev._

## Similar posts on daily.dev

- [Software rendering in 500 lines of bare C\+\+](https://daily.dev/posts/software-rendering-in-500-lines-of-bare-c--8zxoc44yj) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#rust](https://daily.dev/tags/rust), [#vulkan](https://daily.dev/tags/vulkan), [#graphics-programming](https://daily.dev/tags/graphics-programming), [#bevy](https://daily.dev/tags/bevy)

[View this post on daily.dev](https://daily.dev/posts/it-s-one-triangle-michael-what-could-it-cost--1ydmxx44m)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"It's one triangle, Michael. What could it cost?","url":"https://daily.dev/posts/it-s-one-triangle-michael-what-could-it-cost--1ydmxx44m","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/it-s-one-triangle-michael-what-could-it-cost--1ydmxx44m"},"datePublished":"2026-09-16T11:46:03.189Z","dateModified":"2026-09-16T11:46:26.325Z","description":"A developer experienced with the Bevy game engine documents building a minimal graphics stack from scratch using Rust, SDL3, and Vulkan (via the Ash bindings)...","image":"https://i.ytimg.com/vi/KfgW91RSnp4/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/KfgW91RSnp4/sddefault.jpg","isAccessibleForFree":true,"articleSection":"chris biscardi","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"chris biscardi","logo":"https://media.daily.dev/image/upload/s--4_8aX3uh--/f_auto,q_auto/v1780213720/logos/chrisbiscardi?_a=BAMAMiWQ0","url":"https://daily.dev/sources/chrisbiscardi"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/it-s-one-triangle-michael-what-could-it-cost--1ydmxx44m","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"rust,vulkan,graphics-programming,bevy","timeRequired":"PT19M","video":{"@type":"VideoObject","name":"It's one triangle, Michael. What could it cost?","description":"A developer experienced with the Bevy game engine documents building a minimal graphics stack from scratch using Rust, SDL3, and Vulkan (via the Ash bindings)...","thumbnailUrl":"https://i.ytimg.com/vi/KfgW91RSnp4/sddefault.jpg","uploadDate":"2026-09-16T11:46:03.189Z","duration":"PT19M","url":"https://api.daily.dev/r/1ydmxx44M","embedUrl":"https://www.youtube.com/embed/KfgW91RSnp4"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"chris biscardi","item":"https://daily.dev/sources/chrisbiscardi"},{"@type":"ListItem","position":3,"name":"It's one triangle, Michael. What could it cost?"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/it-s-one-triangle-michael-what-could-it-cost--1ydmxx44m#faq","mainEntity":[{"@type":"Question","name":"How do you get Vulkan working on Mac OS with Rust?","acceptedAnswer":{"@type":"Answer","text":"Vulkan support on Mac OS requires MoltenVK as a compatibility layer since Vulkan does not run natively there. Using the Ash Rust bindings alongside SDL3 (with its ash feature enabled) and the Vulkan SDK, developers must follow extra setup steps documented in MoltenVK's user guide and the Ash examples to create a working surface, and Apple Silicon performs best with three swap chain images instead of two. Developers wiring up Vulkan on Apple Silicon can find similar MoltenVK workarounds shared on daily.dev."}},{"@type":"Question","name":"Why choose the Slang shader language over GLSL, HLSL, or WGSL for Vulkan?","acceptedAnswer":{"@type":"Answer","text":"Slang was chosen because it extends HLSL with modern language features like modules and reflection, and it compiles to SPIR-V, the intermediate representation Vulkan actually consumes, and ships bundled with the Vulkan SDK. GLSL is considered an older OpenGL-era language, while WGSL and its community superset Weasel were already familiar, making Slang the more interesting unfamiliar option to explore. Teams deciding between shader languages for Vulkan pipelines compare trade-offs like these on daily.dev."}},{"@type":"Question","name":"What causes a Vulkan triangle to render with missing colors or a garbled index buffer?","acceptedAnswer":{"@type":"Answer","text":"A shared index between two triangles in the index buffer, combined with an accidentally set alpha channel write mask, can cause vertices to render without visible color and produce out-of-bounds index reads. Xcode's GPU frame capture tool revealed both issues on Mac, showing the vertices existed but weren't displaying color due to the RGBA output mask misconfiguration. Graphics programmers debugging similar Vulkan rendering glitches track fixes like these on daily.dev."}}]}
```

