瀏覽代碼

Updated screenshot of the `webgpu_lights_ies_spotlight` (#26800)

sunag 1 年之前
父節點
當前提交
1e673dbaa2
共有 3 個文件被更改,包括 4 次插入3 次删除
  1. 二進制
      examples/screenshots/webgpu_lights_ies_spotlight.jpg
  2. 4 2
      examples/webgpu_lights_ies_spotlight.html
  3. 0 1
      test/e2e/puppeteer.js

二進制
examples/screenshots/webgpu_lights_ies_spotlight.jpg


+ 4 - 2
examples/webgpu_lights_ies_spotlight.html

@@ -31,6 +31,8 @@
 			import * as THREE from 'three';
 
 			import WebGPU from 'three/addons/capabilities/WebGPU.js';
+			import WebGL from 'three/addons/capabilities/WebGL.js';
+
 			import WebGPURenderer from 'three/addons/renderers/webgpu/WebGPURenderer.js';
 
 			import IESSpotLight from 'three/addons/lights/IESSpotLight.js';
@@ -44,11 +46,11 @@
 
 			async function init() {
 
-				if ( WebGPU.isAvailable() === false ) {
+				if ( WebGPU.isAvailable() === false && WebGL.isWebGL2Available() === false ) {
 
 					document.body.appendChild( WebGPU.getErrorMessage() );
 
-					throw new Error( 'No WebGPU support' );
+					throw new Error( 'No WebGPU or WebGL2 support' );
 
 				}
 

+ 0 - 1
test/e2e/puppeteer.js

@@ -118,7 +118,6 @@ const exceptionList = [
 	'webgpu_cubemap_dynamic',
 	'webgpu_depth_texture',
 	'webgpu_instance_mesh',
-	'webgpu_lights_ies_spotlight',
 	'webgpu_lines_fat',
 	'webgpu_loader_gltf',
 	'webgpu_loader_gltf_compressed',