diff --git a/src/components/map/Map.vue b/src/components/map/Map.vue index d73aa769..6b5eb759 100755 --- a/src/components/map/Map.vue +++ b/src/components/map/Map.vue @@ -25,7 +25,6 @@ import { Vector3, WebGLRenderer, RGBFormat, - RGFormat, RedFormat, // eslint-disable-next-line camelcase RGB_S3TC_DXT1_Format @@ -169,7 +168,7 @@ export default { oathgates_text: { hqAvailable: true, localized: true, pixelFormat: RedFormat }, silver_kingdoms: { hqAvailable: true, pixelFormat: RedFormat }, silver_kingdoms_text: { hqAvailable: true, localized: true, pixelFormat: RedFormat }, - graticule: { hqAvailable: true, lossy: true, pixelFormat: RGFormat }, + graticule: { hqAvailable: true, lossy: true, pixelFormat: RGBFormat }, graticule_text: { hqAvailable: true, pixelFormat: RedFormat } } diff --git a/src/components/map/TextureManager.js b/src/components/map/TextureManager.js index d32555c0..9123f41b 100644 --- a/src/components/map/TextureManager.js +++ b/src/components/map/TextureManager.js @@ -1,6 +1,6 @@ import isMobile from 'is-mobile' // eslint-disable-next-line camelcase -import { RGBAFormat, TextureLoader, WebGLUtils } from 'three' +import { LinearFilter, RGBAFormat, TextureLoader, WebGLUtils } from 'three' import { DDSLoader } from 'three/examples/jsm/loaders/DDSLoader' export default class TextureManager { @@ -21,7 +21,9 @@ export default class TextureManager { }) const context = renderer.getContext() this.utils = new WebGLUtils(context, renderer.extensions, renderer.capabilities) - this.supportedCompressionFormats = context.getParameter(context.COMPRESSED_TEXTURE_FORMATS) + this.supportedCompressionFormats = context.getExtension('WEBGL_compressed_texture_s3tc') + ? context.getParameter(context.COMPRESSED_TEXTURE_FORMATS) + : [] this.locale = locale } @@ -63,6 +65,14 @@ export default class TextureManager { texture.loaded = true const basePixelFormat = texture.pixelFormat ?? RGBAFormat data.format = compressed ? texture.compressedPixelFormat : basePixelFormat + data.minFilter = LinearFilter + + if (texture.options !== undefined) { + Object.keys(texture.options).forEach((key) => { + data[key] = texture.options[key] + }) + } + result[name] = data if (Object.keys(textures).every(t => textures[t].loaded === true)) {