1.0.1 • Published 1 year ago

webgpu-helpers v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

WebGPU Helpers

Some scripts I used to help me debug and develop with WebGPU

Most of these you'd add to your page above your scripts.

Show the requestAdaptor and requestDevice info

<script src="https://greggman.github.io/webpgu-helpers/show-request-and-adpater-info.js"></script>

or

import 'https://greggman.github.io/webpgu-helpers/show-request-and-adpater-info.js';

force powerPreference high-performance

<script src="https://greggman.github.io/webpgu-helpers/force-high-performance.js"></script>

or

import 'https://greggman.github.io/webpgu-helpers/force-high-performance.js';

Will also print the adapter info so you can verify which GPU was returned

force powerPreference low-power

<script src="https://greggman.github.io/webpgu-helpers/force-low-power.js"></script>

or

import 'https://greggman.github.io/webpgu-helpers/force-low-power.js';

Will also print the adapter info so you can verify which GPU was returned

Dump Shaders

<script src="https://greggman.github.io/webpgu-helpers/dump-shaders.js"></script>

or

import 'https://greggman.github.io/webpgu-helpers/dump-shaders.js';

This might be useful for things like three.js, babylon.js, unity, etc where it's not clear what shaders are being used and you'd like to produce a stand alone repo for a bug report or just see how their shaders work.

npm also works

Example:

npm install webgpu-helpers
import 'webgpu-helpers/dump-shaders.js';
...

LICENSE

MIT

1.0.1

1 year ago

1.0.0

1 year ago