Skip to content

Commit

Permalink
correct initial blending state and update screenshot (#27009)
Browse files Browse the repository at this point in the history
Co-authored-by: aardgoose <angus.sawyer@email.com>
  • Loading branch information
aardgoose and aardgoose committed Oct 19, 2023
1 parent 38b2608 commit 5ad1a20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/jsm/renderers/webgl/utils/WebGLState.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class WebGLState {
this.currentFlipSided = null;
this.currentCullFace = null;
this.currentProgram = null;
this.currentBlendingEnabled = null;
this.currentBlendingEnabled = false;
this.currentBlending = null;
this.currentBlendSrc = null;
this.currentBlendDst = null;
Expand Down
Binary file modified examples/screenshots/webgpu_sprites.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions examples/webgpu_sprites.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import { texture, uv, userData, rangeFog, color, SpriteNodeMaterial } 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';

let camera, scene, renderer;
Expand All @@ -41,11 +43,11 @@

function init() {

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

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

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

}

Expand Down

0 comments on commit 5ad1a20

Please sign in to comment.