Skip to content

Commit

Permalink
Examples: webgpu_shadertoy and webgpu_tsl_* screenshots (#27105)
Browse files Browse the repository at this point in the history
* webgpu_shadertoy screenshot

* cleanup

* add fallback if available

* add ignored webgpu list
  • Loading branch information
sunag committed Nov 3, 2023
1 parent 6f6ef50 commit c5fc9ed
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
Binary file modified examples/screenshots/webgpu_shadertoy.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgpu_tsl_editor.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgpu_tsl_transpiler.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/webgpu_sprites.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

if ( WebGPU.isAvailable() === false && WebGL.isWebGL2Available() === false ) {

document.body.appendChild( WebGPU.getErrorMessage() );
document.body.appendChild( WebGPU.getErrorMessage() );

throw new Error( 'No WebGPU or WebGL2 support' );

Expand Down
6 changes: 4 additions & 2 deletions examples/webgpu_tsl_editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
import * as Nodes from 'three/nodes';

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 WGSLNodeBuilder from 'three/addons/renderers/webgpu/nodes/WGSLNodeBuilder.js';
import GLSLNodeBuilder from 'three/addons/renderers/webgl/nodes/GLSLNodeBuilder.js';
Expand All @@ -65,11 +67,11 @@

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' );

}

Expand Down
8 changes: 5 additions & 3 deletions test/e2e/puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,13 @@ const exceptionList = [
'webgpu_materials',
'webgpu_materials_video',
'webgpu_sandbox',
'webgpu_shadertoy',
'webgpu_sprites',
'webgpu_video_panorama',

// WebGPURenderer: Unknown problem
'webgpu_shadertoy',
'webgpu_tsl_editor',
'webgpu_tsl_transpiler',
'webgpu_video_panorama'
'webgpu_tsl_transpiler'

];

Expand Down

0 comments on commit c5fc9ed

Please sign in to comment.