@@ -63,30 +63,15 @@ var aBuffer = {
63
63
],
64
64
};
65
65
66
- var alphaToCoverage = {
67
- name: 'Alpha-to-Coverage',
68
- description: `
69
- Alpha-to-coverage is an alternative to alpha testing and alpha blending. See:
70
- <https://bgolus.medium.com/anti-aliased-alpha-test-the-esoteric-alpha-to-coverage-8b177335ae4f>
71
-
72
- This sample visualizes how alpha-to-coverage translates alpha values into sample
73
- coverage on your device. It draws two full-screen quads into a 4-sample
74
- texture, each with the configured color and alpha value. Then, it visualizes the
75
- contents of the resulting 4-sample texture: the circles show the 4 samples of
76
- each texel; the background shows the "resolved" results (average of 4 samples).
77
-
78
- The algorithm that converts alpha to a coverage sample mask varies per device.
79
- This results in different average "blending" proportions between the black
80
- background, the first draw, and the second draw.
81
- Device differences include different tile sizes (e.g. 1x1, 2x2, or 4x4),
82
- "moving" samples (or not) around with in the tile as alpha increases, etc.
83
- `,
84
- filename: "sample/alphaToCoverage",
85
- sources: [
86
- { path: 'main.ts' },
87
- { path: './renderWithAlphaToCoverage.wgsl' },
88
- { path: './showMultisampleTexture.wgsl' },
89
- ],
66
+ var alphaToCoverageEmulator = {
67
+ name: 'Alpha-to-Coverage Inspector/Emulator',
68
+ description: '',
69
+ filename: "sample/alphaToCoverageEmulator",
70
+ external: {
71
+ url: 'https://kai.graphics/alpha-to-coverage-emulator/',
72
+ sourceURL: 'https://github.com/kainino0x/alpha-to-coverage-emulator',
73
+ },
74
+ sources: [],
90
75
};
91
76
92
77
var animometer = {
@@ -681,7 +666,6 @@ const pageCategories = [
681
666
renderBundles,
682
667
occlusionQuery,
683
668
samplerParameters,
684
- alphaToCoverage,
685
669
timestampQuery,
686
670
},
687
671
},
@@ -745,6 +729,7 @@ const pageCategories = [
745
729
clusteredShading,
746
730
spookyball,
747
731
marchingCubes,
732
+ alphaToCoverageEmulator,
748
733
},
749
734
},
750
735
// Samples whose primary purpose is to benchmark WebGPU performance.
@@ -33443,7 +33428,7 @@ function setSampleIFrame(sampleInfo, search = '') {
33443
33428
sampleContainerElem.innerHTML = '';
33444
33429
if (filename) {
33445
33430
const src = external ? external.url : `${filename}${search}`;
33446
- sampleContainerElem.appendChild(createElem('iframe', { src }));
33431
+ sampleContainerElem.appendChild(createElem('iframe', { src, allowfullscreen: '' }));
33447
33432
sampleContainerElem.style.height = sources.length > 0 ? '600px' : '100%';
33448
33433
if (external) {
33449
33434
// For remote samples, get the source URL from the metadata.
0 commit comments