Skip to content

Commit

Permalink
Deploying to gh-pages from @ 389827c 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Sep 20, 2024
1 parent d02d4bb commit 088fffd
Show file tree
Hide file tree
Showing 15 changed files with 3,161 additions and 7 deletions.
14 changes: 13 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ var aBuffer = {
],
};

var alphaToCoverage = {
name: 'Alpha-to-Coverage',
description: 'Visualizes how alpha-to-coverage translates alpha values into sample coverage on your device. This varies per device; for example, not all devices guarantee that once a sample pops in, it will stay; some devices repeat at 2x2 pixels, others at 4x4; etc. The circles show the 4 samples of each pixel; the background checkerboard shows where the pixels are.',
filename: "sample/alphaToCoverage",
sources: [
{ path: 'main.ts' },
{ path: './renderWithAlphaToCoverage.wgsl' },
{ path: './showMultisampleTexture.wgsl' },
],
};

var animometer = {
name: 'Animometer',
description: 'A WebGPU port of the Animometer MotionMark benchmark.',
Expand Down Expand Up @@ -614,10 +625,11 @@ const pageCategories = [
title: 'WebGPU Features',
description: 'Highlights of important WebGPU features.',
samples: {
samplerParameters,
reversedZ,
renderBundles,
occlusionQuery,
samplerParameters,
alphaToCoverage,
},
},
// Samples that demonstrate the GPGPU functionality of WebGPU. These samples generally provide some
Expand Down
2 changes: 1 addition & 1 deletion main.js.map

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions sample/alphaToCoverage/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>webgpu-samples: alphaToCoverage</title>
<style>
:root {
color-scheme: light dark;
}
html, body {
margin: 0; /* remove default margin */
height: 100%; /* make body fill the browser window */
display: flex;
place-content: center center;
}
canvas {
width: min(100vw, 100vh);
height: min(100vw, 100vh);
display: block;
}
</style>
<script src="../../third_party/gif.js/gif.js"></script>
<script defer type="module" src="main.js"></script>
<script defer type="module" src="../../js/iframe-helper.js"></script>
</head>
<body>
<canvas></canvas>
</body>
</html>
Loading

0 comments on commit 088fffd

Please sign in to comment.