diff --git a/examples/jsm/libs/basis/README.md b/examples/jsm/libs/basis/README.md index 2d7744fcf80c1d..ab19ebada88ea8 100644 --- a/examples/jsm/libs/basis/README.md +++ b/examples/jsm/libs/basis/README.md @@ -24,7 +24,6 @@ Both are dependencies of `KTX2Loader`: ```js const ktx2Loader = new KTX2Loader(); -ktx2Loader.setTranscoderPath( 'examples/jsm/libs/basis/' ); ktx2Loader.detectSupport( renderer ); ktx2Loader.load( 'diffuse.ktx2', function ( texture ) { diff --git a/examples/jsm/libs/draco/README.md b/examples/jsm/libs/draco/README.md index 4d891646db2fad..40b6ce0fabd709 100644 --- a/examples/jsm/libs/draco/README.md +++ b/examples/jsm/libs/draco/README.md @@ -22,7 +22,6 @@ Either variation may be used with `DRACOLoader`: ```js var dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath('path/to/decoders/'); -dracoLoader.setDecoderConfig({type: 'js'}); // (Optional) Override detection of WASM support. ``` Further [documentation on GitHub](https://github.com/google/draco/tree/master/javascript/example#static-loading-javascript-decoder). diff --git a/examples/jsm/loaders/DRACOLoader.js b/examples/jsm/loaders/DRACOLoader.js index 4636d0a38e7830..265bb6d1ffd580 100644 --- a/examples/jsm/loaders/DRACOLoader.js +++ b/examples/jsm/loaders/DRACOLoader.js @@ -102,11 +102,13 @@ class DRACOLoader extends Loader { /** * Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins. * + * @deprecated * @param {{type:('js'|'wasm')}} config - The decoder config. * @return {DRACOLoader} A reference to this loader. */ setDecoderConfig( config ) { + console.warn( 'THREE.DRACOLoader: setDecoderConfig to has been deprecated and will be removed in r194.' ); this.decoderConfig = config; return this; diff --git a/examples/jsm/loaders/KTX2Loader.js b/examples/jsm/loaders/KTX2Loader.js index 1c6492a9e96044..75e717c100d0d8 100644 --- a/examples/jsm/loaders/KTX2Loader.js +++ b/examples/jsm/loaders/KTX2Loader.js @@ -103,6 +103,9 @@ import { import { ZSTDDecoder } from '../libs/zstddec.module.js'; import { DisplayP3ColorSpace, LinearDisplayP3ColorSpace } from '../math/ColorSpaces.js'; +const WASM_BIN_URL = new URL( '../libs/basis/basis_transcoder.wasm', import.meta.url ).toString(); +const WASM_JS_URL = new URL( '../libs/basis/basis_transcoder.js', import.meta.url ).toString(); + const _taskCache = new WeakMap(); let _activeLoaders = 0; @@ -169,9 +172,9 @@ class KTX2Loader extends Loader { } /** - * Sets the transcoder path. + * Sets the transcoder path to optionally set the decoder load path from a CDN. * - * The WASM transcoder and JS wrapper are available from the `examples/jsm/libs/basis` directory. + * By default The WASM transcoder and JS wrapper are loaded from the `examples/jsm/libs/basis` directory. * * @param {string} path - The transcoder path to set. * @return {KTX2Loader} A reference to this loader. @@ -280,18 +283,30 @@ class KTX2Loader extends Loader { if ( ! this.transcoderPending ) { - // Load transcoder wrapper. const jsLoader = new FileLoader( this.manager ); - jsLoader.setPath( this.transcoderPath ); jsLoader.setWithCredentials( this.withCredentials ); - const jsContent = jsLoader.loadAsync( 'basis_transcoder.js' ); - // Load transcoder WASM binary. const binaryLoader = new FileLoader( this.manager ); - binaryLoader.setPath( this.transcoderPath ); - binaryLoader.setResponseType( 'arraybuffer' ); binaryLoader.setWithCredentials( this.withCredentials ); - const binaryContent = binaryLoader.loadAsync( 'basis_transcoder.wasm' ); + binaryLoader.setResponseType( 'arraybuffer' ); + + let jsContent, binaryContent; + if ( this.transcoderPath === '' ) { + + jsContent = jsLoader.loadAsync( WASM_JS_URL ); + binaryContent = binaryLoader.loadAsync( WASM_BIN_URL ); + + } else { + + // Load transcoder wrapper. + jsLoader.setPath( this.transcoderPath ); + jsContent = jsLoader.loadAsync( 'basis_transcoder.js' ); + + // Load transcoder WASM binary. + binaryLoader.setPath( this.transcoderPath ); + binaryContent = binaryLoader.loadAsync( 'basis_transcoder.wasm' ); + + } this.transcoderPending = Promise.all( [ jsContent, binaryContent ] ) .then( ( [ jsContent, binaryContent ] ) => { diff --git a/examples/jsm/tsl/display/AnamorphicNode.js b/examples/jsm/tsl/display/AnamorphicNode.js deleted file mode 100644 index 3033ca4baf1855..00000000000000 --- a/examples/jsm/tsl/display/AnamorphicNode.js +++ /dev/null @@ -1,293 +0,0 @@ -import { RenderTarget, Vector2, TempNode, QuadMesh, NodeMaterial, RendererUtils } from 'three/webgpu'; -import { nodeObject, Fn, float, NodeUpdateType, uv, passTexture, uniform, convertToTexture, vec2, vec3, Loop, mix, luminance } from 'three/tsl'; - -const _quadMesh = /*@__PURE__*/ new QuadMesh(); - -let _rendererState; - -/** - * Post processing node for adding an anamorphic flare effect. - * - * @augments TempNode - * @three_import import { anamorphic } from 'three/addons/tsl/display/AnamorphicNode.js'; - */ -class AnamorphicNode extends TempNode { - - static get type() { - - return 'AnamorphicNode'; - - } - - /** - * Constructs a new anamorphic node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - * @param {Node} thresholdNode - The threshold is one option to control the intensity and size of the effect. - * @param {Node} scaleNode - Defines the vertical scale of the flares. - * @param {number} samples - More samples result in larger flares and a more expensive runtime behavior. - */ - constructor( textureNode, thresholdNode, scaleNode, samples ) { - - super( 'vec4' ); - - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - this.textureNode = textureNode; - - /** - * The threshold is one option to control the intensity and size of the effect. - * - * @type {Node} - */ - this.thresholdNode = thresholdNode; - - /** - * Defines the vertical scale of the flares. - * - * @type {Node} - */ - this.scaleNode = scaleNode; - - /** - * The color of the flares. - * - * @type {Node} - */ - this.colorNode = vec3( 0.1, 0.0, 1.0 ); - - /** - * More samples result in larger flares and a more expensive runtime behavior. - * - * @type {Node} - */ - this.samples = samples; - - /** - * The resolution scale. - * - * @type {number} - */ - this.resolutionScale = 1; - - /** - * The internal render target of the effect. - * - * @private - * @type {RenderTarget} - */ - this._renderTarget = new RenderTarget( 1, 1, { depthBuffer: false } ); - this._renderTarget.texture.name = 'anamorphic'; - - /** - * A uniform node holding the inverse resolution value. - * - * @private - * @type {UniformNode} - */ - this._invSize = uniform( new Vector2() ); - - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - this._textureNode = passTexture( this, this._renderTarget.texture ); - - /** - * The material for the anamorphic pass. - * - * @private - * @type {?NodeMaterial} - */ - this._material = null; - - - /** - * The `updateBeforeType` is set to `NodeUpdateType.FRAME` since the node renders - * its effect once per frame in `updateBefore()`. - * - * @type {string} - * @default 'frame' - */ - this.updateBeforeType = NodeUpdateType.FRAME; - - } - - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode() { - - return this._textureNode; - - } - - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize( width, height ) { - - this._invSize.value.set( 1 / width, 1 / height ); - - width = Math.max( Math.round( width * this.resolutionScale ), 1 ); - height = Math.max( Math.round( height * this.resolutionScale ), 1 ); - - this._renderTarget.setSize( width, height ); - - } - - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore( frame ) { - - const { renderer } = frame; - - _rendererState = RendererUtils.resetRendererState( renderer, _rendererState ); - - // - - const textureNode = this.textureNode; - const map = textureNode.value; - - this._renderTarget.texture.type = map.type; - - const currentTexture = textureNode.value; - - _quadMesh.material = this._material; - _quadMesh.name = 'Anamorphic'; - - this.setSize( map.image.width, map.image.height ); - - // render - - renderer.setRenderTarget( this._renderTarget ); - - _quadMesh.render( renderer ); - - // restore - - textureNode.value = currentTexture; - - RendererUtils.restoreRendererState( renderer, _rendererState ); - - } - - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup( builder ) { - - const textureNode = this.textureNode; - const uvNode = textureNode.uvNode || uv(); - - const sampleTexture = ( uv ) => textureNode.sample( uv ); - - const threshold = ( color, threshold ) => mix( vec3( 0.0 ), color, luminance( color ).sub( threshold ).max( 0 ) ); - - const anamorph = Fn( () => { - - const samples = this.samples; - const halfSamples = Math.floor( samples / 2 ); - - const total = vec3( 0 ).toVar(); - - Loop( { start: - halfSamples, end: halfSamples }, ( { i } ) => { - - const softness = float( i ).abs().div( halfSamples ).oneMinus(); - - const uv = vec2( uvNode.x.add( this._invSize.x.mul( i ).mul( this.scaleNode ) ), uvNode.y ); - const color = sampleTexture( uv ); - const pass = threshold( color, this.thresholdNode ).mul( softness ); - - total.addAssign( pass ); - - } ); - - return total.mul( this.colorNode ); - - } ); - - // - - const material = this._material || ( this._material = new NodeMaterial() ); - material.name = 'Anamorphic'; - material.fragmentNode = anamorph(); - - // - - const properties = builder.getNodeProperties( this ); - properties.textureNode = textureNode; - - // - - return this._textureNode; - - } - - /** - * Frees internal resources. This method should be called - * when the effect is no longer required. - */ - dispose() { - - this._renderTarget.dispose(); - - if ( this._material !== null ) this._material.dispose(); - - } - - /** - * The resolution scale. - * - * @deprecated - * @type {Vector2} - * @default {(1,1)} - */ - get resolution() { - - console.warn( 'THREE.AnamorphicNode: The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.' ); // @deprecated r180 - - return new Vector2( this.resolutionScale, this.resolutionScale ); - - } - - set resolution( value ) { - - console.warn( 'THREE.AnamorphicNode: The "resolution" property has been renamed to "resolutionScale" and is now of type `number`.' ); // @deprecated r180 - - this.resolutionScale = value.x; - - } - -} - -/** - * TSL function for creating an anamorphic flare effect. - * - * @tsl - * @function - * @param {TextureNode} node - The node that represents the input of the effect. - * @param {Node | number} [threshold=0.9] - The threshold is one option to control the intensity and size of the effect. - * @param {Node | number} [scale=3] - Defines the vertical scale of the flares. - * @param {number} [samples=32] - More samples result in larger flares and a more expensive runtime behavior. - * @returns {AnamorphicNode} - */ -export const anamorphic = ( node, threshold = .9, scale = 3, samples = 32 ) => new AnamorphicNode( convertToTexture( node ), nodeObject( threshold ), nodeObject( scale ), samples ); - -export default AnamorphicNode; diff --git a/examples/jsm/tsl/display/BloomNode.js b/examples/jsm/tsl/display/BloomNode.js index eeb12261d94cc5..947ac837c802d9 100644 --- a/examples/jsm/tsl/display/BloomNode.js +++ b/examples/jsm/tsl/display/BloomNode.js @@ -9,6 +9,15 @@ const _BlurDirectionY = /*@__PURE__*/ new Vector2( 0.0, 1.0 ); let _rendererState; +const luminosityHighPass = Fn( ( { input, threshold, smoothWidth } ) => { + + const v = luminance( input.rgb ); + const alpha = smoothstep( threshold, threshold.add( smoothWidth ), v ); + + return mix( vec4( 0 ), input, alpha ); + +} ); + /** * Post processing node for creating a bloom effect. * ```js @@ -74,21 +83,21 @@ class BloomNode extends TempNode { * * @type {UniformNode} */ - this.strength = uniform( strength ); + this.strength = strength.isNode ? strength : uniform( strength ); /** * The radius of the bloom. Must be in the range `[0,1]`. * * @type {UniformNode} */ - this.radius = uniform( radius ); + this.radius = radius.isNode ? radius : uniform( radius ); /** * The luminance threshold limits which bright areas contribute to the bloom effect. * * @type {UniformNode} */ - this.threshold = uniform( threshold ); + this.threshold = threshold.isNode ? threshold : uniform( threshold ); /** * Can be used to tweak the extracted luminance from the scene. @@ -97,6 +106,22 @@ class BloomNode extends TempNode { */ this.smoothWidth = uniform( 0.01 ); + /** + * Scale factor for the internal render targets. + * + * @private + * @type {number} + * @default 0.5 + */ + this._resolutionScale = 0.5; + + /** + * Can be used to inject a custom high pass filter (e.g., for anamorphic effects). + * + * @type {Function} + */ + this.highPassFn = luminosityHighPass; + /** * An array that holds the render targets for the horizontal blur passes. * @@ -253,6 +278,32 @@ class BloomNode extends TempNode { } + /** + * Sets the resolution scale for the pass. + * The resolution scale is a factor that is multiplied with the renderer's width and height. + * + * @param {number} resolutionScale - The resolution scale to set. A value of `1` means full resolution. + * @return {BloomNode} A reference to this node. + */ + setResolutionScale( resolutionScale ) { + + this._resolutionScale = resolutionScale; + + return this; + + } + + /** + * Gets the current resolution scale of the pass. + * + * @return {number} The current resolution scale. A value of `1` means full resolution. + */ + getResolutionScale() { + + return this._resolutionScale; + + } + /** * Sets the size of the effect. * @@ -261,8 +312,8 @@ class BloomNode extends TempNode { */ setSize( width, height ) { - let resx = Math.round( width / 2 ); - let resy = Math.round( height / 2 ); + let resx = Math.round( width * this._resolutionScale ); + let resy = Math.round( height * this._resolutionScale ); this._renderTargetBright.setSize( resx, resy ); @@ -350,19 +401,8 @@ class BloomNode extends TempNode { // luminosity high pass material - const luminosityHighPass = Fn( () => { - - const texel = this.inputNode; - const v = luminance( texel.rgb ); - - const alpha = smoothstep( this.threshold, this.threshold.add( this.smoothWidth ), v ); - - return mix( vec4( 0 ), texel, alpha ); - - } ); - this._highPassFilterMaterial = this._highPassFilterMaterial || new NodeMaterial(); - this._highPassFilterMaterial.fragmentNode = luminosityHighPass().context( builder.getSharedContext() ); + this._highPassFilterMaterial.fragmentNode = this.highPassFn( { input: this.inputNode, threshold: this.threshold, smoothWidth: this.smoothWidth } ).context( builder.getSharedContext() ); this._highPassFilterMaterial.name = 'Bloom_highPass'; this._highPassFilterMaterial.needsUpdate = true; diff --git a/examples/misc_exporter_gltf.html b/examples/misc_exporter_gltf.html index ca02f5670a3de1..9c6346d63c7467 100644 --- a/examples/misc_exporter_gltf.html +++ b/examples/misc_exporter_gltf.html @@ -489,7 +489,6 @@ // Exporting compressed textures and meshes (KTX2 / Draco / Meshopt) // --------------------------------------------------------------------- const ktx2Loader = new KTX2Loader() - .setTranscoderPath( 'jsm/libs/basis/' ) .detectSupport( renderer ); const gltfLoader = new GLTFLoader().setPath( 'models/gltf/' ); diff --git a/examples/misc_exporter_usdz.html b/examples/misc_exporter_usdz.html index 1c16fc8ace1dcf..73faff5aac49ec 100644 --- a/examples/misc_exporter_usdz.html +++ b/examples/misc_exporter_usdz.html @@ -90,7 +90,7 @@ scene.background = new THREE.Color( 0xf0f0f0 ); scene.environment = pmremGenerator.fromScene( new RoomEnvironment(), 0.04 ).texture; - const ktx2loader = new KTX2Loader().setTranscoderPath( 'jsm/libs/basis/' ).detectSupport( renderer ); + const ktx2loader = new KTX2Loader().detectSupport( renderer ); const dracoLoader = new DRACOLoader().setDecoderPath( 'jsm/libs/draco/' ); const gltfLoader = new GLTFLoader(); diff --git a/examples/screenshots/webgpu_postprocessing_anamorphic.jpg b/examples/screenshots/webgpu_postprocessing_anamorphic.jpg index 8f41910256faf7..e83b9cadc02f0a 100644 Binary files a/examples/screenshots/webgpu_postprocessing_anamorphic.jpg and b/examples/screenshots/webgpu_postprocessing_anamorphic.jpg differ diff --git a/examples/webgl_loader_3dtiles.html b/examples/webgl_loader_3dtiles.html index ed914565cea173..460a077fa83dc8 100644 --- a/examples/webgl_loader_3dtiles.html +++ b/examples/webgl_loader_3dtiles.html @@ -123,7 +123,6 @@ // loader const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/gltf/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); const DEG2RAD = Math.PI / 180; diff --git a/examples/webgl_loader_draco.html b/examples/webgl_loader_draco.html index ac514c250731e3..c7f1ae09377ea0 100644 --- a/examples/webgl_loader_draco.html +++ b/examples/webgl_loader_draco.html @@ -39,7 +39,6 @@ // Configure and create Draco decoder. const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); init(); diff --git a/examples/webgl_loader_gltf_animation_pointer.html b/examples/webgl_loader_gltf_animation_pointer.html index afffc69cb10044..e5eb4d9591a7e8 100644 --- a/examples/webgl_loader_gltf_animation_pointer.html +++ b/examples/webgl_loader_gltf_animation_pointer.html @@ -88,7 +88,6 @@ const ktx2Loader = new KTX2Loader() - .setTranscoderPath( 'jsm/libs/basis/' ) .detectSupport( renderer ); const loader = new GLTFLoader(); diff --git a/examples/webgl_loader_gltf_compressed.html b/examples/webgl_loader_gltf_compressed.html index bb2e50d62dd0dd..5c1482ea110d4b 100644 --- a/examples/webgl_loader_gltf_compressed.html +++ b/examples/webgl_loader_gltf_compressed.html @@ -73,7 +73,6 @@ scene.add( grid ); const ktx2Loader = new KTX2Loader() - .setTranscoderPath( 'jsm/libs/basis/' ) .detectSupport( renderer ); const loader = new GLTFLoader().setPath( 'models/gltf/' ); diff --git a/examples/webgl_loader_texture_ktx2.html b/examples/webgl_loader_texture_ktx2.html index 798d43b809e6b6..88ce49358ab47e 100644 --- a/examples/webgl_loader_texture_ktx2.html +++ b/examples/webgl_loader_texture_ktx2.html @@ -150,7 +150,6 @@ renderer.setPixelRatio( window.devicePixelRatio ); const loader = new KTX2Loader() - .setTranscoderPath( 'jsm/libs/basis/' ) .setPath( 'textures/ktx2/' ) .detectSupport( renderer ); diff --git a/examples/webgl_materials_envmaps_fasthdr.html b/examples/webgl_materials_envmaps_fasthdr.html index 98ffd94e80c750..b7a7575a196f4d 100644 --- a/examples/webgl_materials_envmaps_fasthdr.html +++ b/examples/webgl_materials_envmaps_fasthdr.html @@ -109,7 +109,6 @@ scene.add( sphere05 ); const loader = new KTX2Loader() - .setTranscoderPath( 'jsm/libs/basis/' ) .detectSupport( renderer ); function loadTexture( url ) { diff --git a/examples/webgl_morphtargets_face.html b/examples/webgl_morphtargets_face.html index aeb6519ce6d1f5..0e18dc72699030 100644 --- a/examples/webgl_morphtargets_face.html +++ b/examples/webgl_morphtargets_face.html @@ -73,7 +73,6 @@ container.appendChild( renderer.domElement ); const ktx2Loader = new KTX2Loader() - .setTranscoderPath( 'jsm/libs/basis/' ) .detectSupport( renderer ); new GLTFLoader() diff --git a/examples/webgl_morphtargets_webcam.html b/examples/webgl_morphtargets_webcam.html index 309e2a320fa96c..267c2ea70160c2 100644 --- a/examples/webgl_morphtargets_webcam.html +++ b/examples/webgl_morphtargets_webcam.html @@ -130,7 +130,6 @@ const eyeRotationLimit = THREE.MathUtils.degToRad( 30 ); const ktx2Loader = new KTX2Loader() - .setTranscoderPath( 'jsm/libs/basis/' ) .detectSupport( renderer ); new GLTFLoader() diff --git a/examples/webgl_postprocessing_gtao.html b/examples/webgl_postprocessing_gtao.html index 18f46f835ace7d..ca98d91459dbf2 100644 --- a/examples/webgl_postprocessing_gtao.html +++ b/examples/webgl_postprocessing_gtao.html @@ -55,7 +55,6 @@ const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); const loader = new GLTFLoader(); loader.setDRACOLoader( dracoLoader ); loader.setPath( 'models/gltf/' ); diff --git a/examples/webgl_postprocessing_ssr.html b/examples/webgl_postprocessing_ssr.html index 5ba6475d6f999e..9345e5cabf7a52 100644 --- a/examples/webgl_postprocessing_ssr.html +++ b/examples/webgl_postprocessing_ssr.html @@ -66,7 +66,6 @@ // Configure and create Draco decoder. const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); init(); diff --git a/examples/webgl_texture2darray_compressed.html b/examples/webgl_texture2darray_compressed.html index fc47fa9cd05bdb..6945f7e00c467e 100644 --- a/examples/webgl_texture2darray_compressed.html +++ b/examples/webgl_texture2darray_compressed.html @@ -101,7 +101,6 @@ // const ktx2Loader = new KTX2Loader(); - ktx2Loader.setTranscoderPath( 'jsm/libs/basis/' ); ktx2Loader.detectSupport( renderer ); ktx2Loader.load( 'textures/spiritedaway.ktx2', function ( texturearray ) { diff --git a/examples/webgl_texture2darray_layerupdate.html b/examples/webgl_texture2darray_layerupdate.html index 311e43844f6f95..bb15e4eafcc239 100644 --- a/examples/webgl_texture2darray_layerupdate.html +++ b/examples/webgl_texture2darray_layerupdate.html @@ -98,7 +98,6 @@ // Configure the KTX2 loader. const ktx2Loader = new KTX2Loader(); - ktx2Loader.setTranscoderPath( 'jsm/libs/basis/' ); ktx2Loader.detectSupport( renderer ); // Load several KTX2 textures which will later be used to modify diff --git a/examples/webgpu_caustics.html b/examples/webgpu_caustics.html index 629eef60cc52a8..2daa00f3b20f49 100644 --- a/examples/webgpu_caustics.html +++ b/examples/webgpu_caustics.html @@ -78,7 +78,6 @@ const dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath( 'jsm/libs/draco/' ); - dracoLoader.setDecoderConfig( { type: 'js' } ); gltf = ( await new GLTFLoader().setDRACOLoader( dracoLoader ).loadAsync( './models/gltf/duck.glb' ) ).scene; gltf.scale.setScalar( .5 ); diff --git a/examples/webgpu_loader_gltf_compressed.html b/examples/webgpu_loader_gltf_compressed.html index 994d2ca72c4d3d..ef757fcdfa9ab9 100644 --- a/examples/webgpu_loader_gltf_compressed.html +++ b/examples/webgpu_loader_gltf_compressed.html @@ -82,7 +82,6 @@ controls.update(); const ktx2Loader = await new KTX2Loader() - .setTranscoderPath( 'jsm/libs/basis/' ) .detectSupport( renderer ); const loader = new GLTFLoader(); diff --git a/examples/webgpu_loader_texture_ktx2.html b/examples/webgpu_loader_texture_ktx2.html index 53947416461550..ffac763e42c288 100644 --- a/examples/webgpu_loader_texture_ktx2.html +++ b/examples/webgpu_loader_texture_ktx2.html @@ -152,7 +152,6 @@ await renderer.init(); const loader = new KTX2Loader() - .setTranscoderPath( 'jsm/libs/basis/' ) .setPath( 'textures/ktx2/' ) .detectSupport( renderer ); diff --git a/examples/webgpu_morphtargets_face.html b/examples/webgpu_morphtargets_face.html index c2747c06ab8391..688b428a9625c7 100644 --- a/examples/webgpu_morphtargets_face.html +++ b/examples/webgpu_morphtargets_face.html @@ -77,7 +77,6 @@ scene.environment = pmremGenerator.fromScene( environment, 0.04 ).texture; const ktx2Loader = await new KTX2Loader() - .setTranscoderPath( 'jsm/libs/basis/' ) .detectSupport( renderer ); new GLTFLoader() diff --git a/examples/webgpu_postprocessing_anamorphic.html b/examples/webgpu_postprocessing_anamorphic.html index 7895a769cf3f62..ee765cda40b932 100644 --- a/examples/webgpu_postprocessing_anamorphic.html +++ b/examples/webgpu_postprocessing_anamorphic.html @@ -20,7 +20,7 @@ - Battle Damaged Sci-fi Helmet by theblueturtle_. + Anamorphic bloom filter using custom high pass filter. @@ -38,22 +38,17 @@