Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/jsm/libs/glslang.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions examples/jsm/renderers/webgpu/WebGPURenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import WebGPUBindings from './WebGPUBindings.js';
import WebGPURenderLists from './WebGPURenderLists.js';
import WebGPUTextures from './WebGPUTextures.js';
import WebGPUBackground from './WebGPUBackground.js';

import WebGPUNodes from './nodes/WebGPUNodes.js';

import glslang from '../../libs/glslang.js';

import { Frustum, Matrix4, Vector3, Color } from '../../../../build/three.module.js';

console.info( 'THREE.WebGPURenderer: Modified Matrix4.makePerspective() and Matrix4.makeOrtographic() to work with WebGPU, see https://github.com/mrdoob/three.js/issues/20276.' );
Expand Down Expand Up @@ -157,9 +158,7 @@ class WebGPURenderer {

const device = await adapter.requestDevice( deviceDescriptor );

// https://cdn.jsdelivr.net/npm/@webgpu/[email protected]/dist/web-devel/glslang.js
const glslang = await import( '../../libs/glslang.js' );
const compiler = await glslang.default();
const compiler = await glslang();

const context = ( parameters.context !== undefined ) ? parameters.context : this.domElement.getContext( 'gpupresent' );

Expand Down