Skip to content

Commit 6cd6c7f

Browse files
mvaligurskyMartin Valigursky
andauthored
Add WebGPU compute shader radix sort + changes / fixes to render pass based radix sort (playcanvas#8276)
* Add WebGPU compute shader radix sort + changes / fixes to render pass based radix sort * lint --------- Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
1 parent 06606f5 commit 6cd6c7f

20 files changed

+1928
-183
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* @param {import('../../app/components/Example.mjs').ControlOptions} options - The options.
3+
* @returns {JSX.Element} The returned JSX Element.
4+
*/
5+
export const controls = ({ observer, ReactPCUI, jsx, fragment }) => {
6+
const { BindingTwoWay, LabelGroup, Panel, SliderInput, SelectInput } = ReactPCUI;
7+
8+
return fragment(
9+
jsx(
10+
Panel,
11+
{ headerText: 'Compute Radix Sort' },
12+
jsx(
13+
LabelGroup,
14+
{ text: 'Elements (K)' },
15+
jsx(SliderInput, {
16+
binding: new BindingTwoWay(),
17+
link: { observer, path: 'options.elementsK' },
18+
min: 1,
19+
max: 10000,
20+
precision: 0
21+
})
22+
),
23+
jsx(
24+
LabelGroup,
25+
{ text: 'Bits' },
26+
jsx(SelectInput, {
27+
binding: new BindingTwoWay(),
28+
link: { observer, path: 'options.bits' },
29+
options: [
30+
{ v: 4, t: '4 bits (1 pass)' },
31+
{ v: 8, t: '8 bits (2 passes)' },
32+
{ v: 12, t: '12 bits (3 passes)' },
33+
{ v: 16, t: '16 bits (4 passes)' },
34+
{ v: 20, t: '20 bits (5 passes)' },
35+
{ v: 24, t: '24 bits (6 passes)' },
36+
{ v: 28, t: '28 bits (7 passes)' },
37+
{ v: 32, t: '32 bits (8 passes)' }
38+
]
39+
})
40+
)
41+
)
42+
);
43+
};

0 commit comments

Comments
 (0)