Przeglądaj źródła

WebGPU: Add flag tip message for chrome (#24892)

* webgpu flag tip message

* Update WebGPU.js

Co-authored-by: Michael Herzog <[email protected]>
sunag 2 lat temu
rodzic
commit
e8fe7943c1
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      examples/jsm/capabilities/WebGPU.js

+ 3 - 1
examples/jsm/capabilities/WebGPU.js

@@ -14,7 +14,9 @@ class WebGPU {
 
 	static getErrorMessage() {
 
-		const message = 'Your browser does not support <a href="https://gpuweb.github.io/gpuweb/" style="color:blue">WebGPU</a>';
+		let message = 'Your browser does not support <a href="https://gpuweb.github.io/gpuweb/" style="color:blue">WebGPU</a>';
+
+		if ( !! window.chrome ) message += '<br>Try: <b>chrome://flags/#enable-unsafe-webgpu</b>';
 
 		const element = document.createElement( 'div' );
 		element.id = 'webgpumessage';