Skip to content
Open
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
fa18202
Fork chroma-keying, rewrite it to tgsl
Oct 8, 2025
661ac6b
Use fixed resources
Oct 8, 2025
cad7e0b
Use const
Oct 8, 2025
707946b
Update Chroma Keying
Oct 8, 2025
58e721b
Remove unnecessary controls
Oct 8, 2025
3995789
Split into files
Oct 8, 2025
5c582be
Add onnx
Oct 8, 2025
37d78bf
Merge remote-tracking branch 'origin/main' into docs/binary-image-seg…
Oct 17, 2025
c8af87a
Semi working state
Oct 17, 2025
4b9cae9
Add downscaling pipeline
Oct 17, 2025
d23f00b
Somewhat working one frame
Oct 20, 2025
0376eb3
Extract fullscreen triangle and model creation to dedicated files
Oct 20, 2025
8d5912a
Remove ios handling temporarily (surely)
Oct 20, 2025
c077735
Move downscale to another file
Oct 20, 2025
53f0677
Change downscale from render to compute
Oct 20, 2025
75111fb
More refactor
Oct 20, 2025
5180176
More refactor
Oct 20, 2025
2788f54
Rewrite generateMasko to compute
Oct 20, 2025
67b5b9b
More refactor
Oct 20, 2025
c9d4113
More refactor
Oct 20, 2025
8a9c68a
More refactor
Oct 20, 2025
2d8584e
Add a new model to assets
Oct 20, 2025
2152bca
Switch models
Oct 20, 2025
9dea9f7
Fix the offset
Oct 21, 2025
f69b10b
Better model
Oct 21, 2025
5555457
Calculate mask independently
Oct 21, 2025
0f78115
Add blur
Oct 22, 2025
d7956d5
Remove options uniform
Oct 22, 2025
20224b4
Fix the blur to cover the entire screen
Oct 22, 2025
8b24433
Merge remote-tracking branch 'origin/main' into docs/binary-image-seg…
Oct 22, 2025
89fb49f
Use fullScreenTriangle
Oct 22, 2025
f2ce2cf
Merge remote-tracking branch 'origin/main' into docs/binary-image-seg…
Oct 27, 2025
e29e193
Fix camera tresholding, use fullscreen triangle
Oct 27, 2025
71d6fe2
Update tests
Oct 27, 2025
e74fbb7
Add blur strength controls
Oct 27, 2025
fdb447d
Update tags and add thumbnail
Oct 27, 2025
a9b6165
Add proper cleanup
Oct 27, 2025
ef4a9d0
Docs & refactor
Oct 27, 2025
bd7b82a
Add attribution
Oct 27, 2025
cd21293
Review fixes
Oct 27, 2025
136ba07
Remove the x coordinate flip
Oct 27, 2025
9cee84d
Add back iOS support
Oct 27, 2025
0ed89b9
Make attribution transparent until the model loads
Oct 27, 2025
744bd47
Use mipmaps for blur
Oct 28, 2025
9d75a5f
Add controls to swap between blur types
Oct 28, 2025
152bb5b
Add subgroups check
Oct 28, 2025
bb13302
Create textures for the blurred images immediately
Oct 28, 2025
131a6c6
Precompute bind groups for blur
Oct 28, 2025
1e9b36a
Precompute mask bind group
Oct 28, 2025
5d14aa6
Merge remote-tracking branch 'origin/main' into docs/binary-image-seg…
Oct 28, 2025
89b88e7
Lint
Oct 28, 2025
a40be8a
Throw an appropriate error on Safari
Nov 3, 2025
2bfb616
Merge remote-tracking branch 'origin/main' into docs/binary-image-seg…
Nov 3, 2025
b3a16ea
Remove iOS handling (again...)
Nov 3, 2025
652673b
Add back lazy textures (didn't work with mobile resolutions)
Nov 3, 2025
f715c32
Merge branch 'main' into docs/binary-image-segmentation-example
aleksanderkatan Nov 5, 2025
7d4ce5b
Update tests
Nov 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/typegpu-docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ export default defineConfig({
'process.env.NODE_DEBUG_NATIVE': '""',
},
optimizeDeps: {
exclude: ['@rolldown/browser'],
exclude: [
'@rolldown/browser',
'onnxruntime-web',
],
},
// Allowing query params, for invalidation
plugins: [
Expand All @@ -65,6 +68,7 @@ export default defineConfig({
noExternal: [
'wgsl-wasm-transpiler-bundler',
'@rolldown/browser',
'onnxruntime-web',
],
},
},
Expand Down
4 changes: 3 additions & 1 deletion apps/typegpu-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
"fuse.js": "catalog:frontend",
"jotai": "^2.15.0",
"jotai-location": "^0.6.2",
"lodash": "^4.17.21",
"lucide-react": "^0.536.0",
"lz-string": "^1.5.0",
"monaco-editor": "^0.53.0",
"morphcharts": "^1.3.2",
"motion": "^12.23.24",
"onnxruntime-web": "1.23.0-dev.20250917-21fbad8a65",
"pathe": "^2.0.3",
"react": "^19.1.0",
"react-dom": "^19.1.0",
Expand All @@ -65,8 +67,8 @@
"@types/babel__standalone": "^7.1.9",
"@types/babel__template": "^7.4.4",
"@types/babel__traverse": "^7.20.7",
"@types/node": "^24.7.0",
"@types/dom-mediacapture-record": "^1.0.22",
"@types/node": "^24.7.0",
"@vitejs/plugin-basic-ssl": "^2.1.0",
"@webgpu/types": "catalog:types",
"astro-vtbot": "^2.1.6",
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<canvas></canvas>
<video autoplay playsinline></video>

<style>
/* Keep the video "painted" so Safari continues decoding frames. */
video {
position: absolute;
top: 0;
left: 0;
width: 1px;
height: 1px;
opacity: 0;
pointer-events: none;
}

#attribution {
opacity: 0;
position: absolute;
margin: 0 auto;
text-align: left;
z-index: 1;
background-color: rgba(0, 0, 0, 0.7);
color: white;
padding: 0.625rem;
border-radius: 0.625rem;
user-select: none;
transition: opacity 0.5s;
}
</style>

<div id="attribution">
<h3 class="controls-header">Attribution (click to dismiss)</h3>
Background segmentation uses the
<a
href="https://github.com/xuebinqin/U-2-Net"
target="_blank"
style="color: #7cd9ff"
>u2netp</a> model by Xuebin Qin et&nbsp;al., licensed under the
<a
href="https://www.apache.org/licenses/LICENSE-2.0"
target="_blank"
style="color: #7cd9ff"
>Apache&nbsp;License&nbsp;2.0</a>.
</div>
Loading