-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebGPURenderer: Add backend information to data-engine
field.
#29670
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
How about we about the data-engine attribute so it provides more information? In this way, we don't have update getDomElement() {
let domElement = this.domElement;
if ( domElement === null ) {
domElement = ( this.parameters.canvas !== undefined ) ? this.parameters.canvas : createCanvasElement();
const backend = ( this.coordinateSystem === WebGPUCoordinateSystem ) ? 'WebGPU backend' : 'WebGL backend';
// OffscreenCanvas does not have setAttribute, see #22811
if ( 'setAttribute' in domElement ) domElement.setAttribute( 'data-engine', `three.js r${REVISION} WebGPURenderer, ${backend}` );
this.domElement = domElement;
}
return domElement;
} |
ae2c2e7
to
9031cd3
Compare
data-engine
field.
Good catch! I'll revert the PR for now. Let's think about a new solution. |
@jclaessens97 If you are interested in the current used backend, can't you just evaluate |
Probably yes. Thought it would be useful to have directly in three, but now that I know what to look for, I succesfully implemented it that way without a need of having it in threejs! |
Description
Currently there is no easy way to debug if you're running on webgpu or webgl fallback. There is an
data-engine
attribute, but it's always set towebgpu
. This should make it easier to debug that.This contribution is funded by Segments.ai