HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
seanbaxter
shaders
C++2021–2022
seanbaxter / shaders

shaders

Circle C++ shaders

3Distinct people
3Mentions
1Explicit recommenders
499GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Circle C++ shaders

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

My favorite use is putting user-defined attributes on data members, and using reflection to generate a UI to manipulate those values. I do it with these shadertoys:…

seanbax used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week3 dated mentions

Observed mentions: 2021-10-05 10:01:07 UTC to 2022-03-12 02:02:22 UTC. Weeks start Monday, UTC.

012021-10-04 00:00:00 UTC to 2021-10-11 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsOct 42021-10-11 00:00:00 UTC to 2021-10-18 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-10-18 00:00:00 UTC to 2021-10-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-10-25 00:00:00 UTC to 2021-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-11-01 00:00:00 UTC to 2021-11-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-11-08 00:00:00 UTC to 2021-11-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-11-15 00:00:00 UTC to 2021-11-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-11-22 00:00:00 UTC to 2021-11-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-11-29 00:00:00 UTC to 2021-12-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-12-06 00:00:00 UTC to 2021-12-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-12-13 00:00:00 UTC to 2021-12-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-12-20 00:00:00 UTC to 2021-12-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsDec 202021-12-27 00:00:00 UTC to 2022-01-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-03 00:00:00 UTC to 2022-01-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-10 00:00:00 UTC to 2022-01-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-17 00:00:00 UTC to 2022-01-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-24 00:00:00 UTC to 2022-01-31 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-31 00:00:00 UTC to 2022-02-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-02-07 00:00:00 UTC to 2022-02-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-02-14 00:00:00 UTC to 2022-02-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-02-21 00:00:00 UTC to 2022-02-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-02-28 00:00:00 UTC to 2022-03-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-03-07 00:00:00 UTC to 2022-03-14 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMar 7

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Oct 42021-10-04 00:00:00 UTC2021-10-11 00:00:00 UTC101
Oct 112021-10-11 00:00:00 UTC2021-10-18 00:00:00 UTC101
Oct 182021-10-18 00:00:00 UTC2021-10-25 00:00:00 UTC000
Oct 252021-10-25 00:00:00 UTC2021-11-01 00:00:00 UTC000
Nov 12021-11-01 00:00:00 UTC2021-11-08 00:00:00 UTC000
Nov 82021-11-08 00:00:00 UTC2021-11-15 00:00:00 UTC000
Nov 152021-11-15 00:00:00 UTC2021-11-22 00:00:00 UTC000
Nov 222021-11-22 00:00:00 UTC2021-11-29 00:00:00 UTC000
Nov 292021-11-29 00:00:00 UTC2021-12-06 00:00:00 UTC000
Dec 62021-12-06 00:00:00 UTC2021-12-13 00:00:00 UTC000
Dec 132021-12-13 00:00:00 UTC2021-12-20 00:00:00 UTC000
Dec 202021-12-20 00:00:00 UTC2021-12-27 00:00:00 UTC000
Dec 272021-12-27 00:00:00 UTC2022-01-03 00:00:00 UTC000
Jan 32022-01-03 00:00:00 UTC2022-01-10 00:00:00 UTC000
Jan 102022-01-10 00:00:00 UTC2022-01-17 00:00:00 UTC000
Jan 172022-01-17 00:00:00 UTC2022-01-24 00:00:00 UTC000
Jan 242022-01-24 00:00:00 UTC2022-01-31 00:00:00 UTC000
Jan 312022-01-31 00:00:00 UTC2022-02-07 00:00:00 UTC000
Feb 72022-02-07 00:00:00 UTC2022-02-14 00:00:00 UTC000
Feb 142022-02-14 00:00:00 UTC2022-02-21 00:00:00 UTC000
Feb 212022-02-21 00:00:00 UTC2022-02-28 00:00:00 UTC000
Feb 282022-02-28 00:00:00 UTC2022-03-07 00:00:00 UTC000
Mar 72022-03-07 00:00:00 UTC2022-03-14 00:00:00 UTC101

What Hacker News says

3 sources
It may be close to a technical impossibility, but the Circle compiler by Sean Baxter is attempting it. That's based on an aggressive "de-pointerization" (see [1] in particular for details). There's also academic work[2] to compile C++ to shaders. I agree that it's an open question how well that will work out. Also as pointed out elsethread, now that buffer device address is starting to land, the friction to compile pointer-intense C++ code should decrease even more. These are exciting times! [1]: https://github.com/seanbaxter/shaders#approaching-circle-sha... [2]: https://arxiv.org/abs/2109.14682
In Adding HLSL and DirectX Support to Clang and LLVM
seanbax·Oct 16, 2021Recommendation phrase
My favorite use is putting user-defined attributes on data members, and using reflection to generate a UI to manipulate those values. I do it with these shadertoys: https://github.com/seanbaxter/shaders#reflection-and-attribu... Just mark your declarations up with custom attributes: [[.imgui::range_float { .1, 5 }]] float Zoom = 1.5; [[.imgui::range_float { 0, 1 }]] float Speed = .15; [[.imgui::range_float { .1, 1 }]] float XScale = .3; [[.imgui::range_float { 0, .5 }]] float YScale = .2; Then loop over the members with a meta for, and emit widget code that's guided by the attribute kind and data. These attributes each define a scrollbar. The kind of data you reflect over will likely come from within the program.
In Circle: C++ Automation Language
I think shader specialisation is handled pretty well in circle. Since you can essentially run arbitrary C++ code at compile time, selection and specialisation of a shader can even depend on hardware specific benchmarks. There is an extensive repo with examples here: https://github.com/seanbaxter/shaders. One example decodes a sprite sheet stored as a png at compile time and creates a specialised compute shader for it. You can also easily implement a control UI based on reflection of uniform shader parameters. Anyways I understand that under different constraints (adherence to C++ standard, can't easily implement a whole C++ frontend and interpreter) this becomes much harder.
In Unified Shader Programming in C++

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.