Improve rendering
This commit is contained in:
parent
f6c7abf8dc
commit
afe2a67ba0
20 changed files with 148 additions and 96 deletions
|
|
@ -1,16 +0,0 @@
|
|||
export const initializeGPU = async (): Promise<GPUDevice> => {
|
||||
const gpu = navigator.gpu;
|
||||
if (!gpu) {
|
||||
throw new Error('WebGPU is not supported');
|
||||
}
|
||||
|
||||
const adapter = await gpu.requestAdapter({
|
||||
powerPreference: 'high-performance',
|
||||
});
|
||||
|
||||
if (!adapter) {
|
||||
throw new Error('Could not request adatper');
|
||||
}
|
||||
|
||||
return await adapter.requestDevice(); // could request more resources
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue