Skip to content

Commit

Permalink
WebGPURenderer: Refactor glslang import.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Jan 26, 2021
1 parent b15bd85 commit f9d120d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/jsm/renderers/webgpu/WebGPURenderer.js
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/glslang@0.0.15/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

0 comments on commit f9d120d

Please sign in to comment.