-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21149 from Mugen87/dev51
WebGPURenderer: Refactor glslang import.
- Loading branch information
Showing
2 changed files
with
5 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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.' ); | ||
|
@@ -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' ); | ||
|
||
|