From 66c6642b398d548b1f9a1aa5a230e63793ab8d2c Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Tue, 24 Dec 2024 23:14:02 +0900 Subject: [PATCH] Fix texture type --- src/plugins/three/fade/FadeBatchedMesh.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/three/fade/FadeBatchedMesh.js b/src/plugins/three/fade/FadeBatchedMesh.js index 7853554d8..14f6cc06a 100644 --- a/src/plugins/three/fade/FadeBatchedMesh.js +++ b/src/plugins/three/fade/FadeBatchedMesh.js @@ -1,6 +1,6 @@ import { PassThroughBatchedMesh } from './PassThroughBatchedMesh.js'; import { InstanceDataTexture } from './InstanceDataTexture.js'; -import { FloatType, RGFormat } from 'three'; +import { RGFormat, UnsignedByteType } from 'three'; import { wrapFadeMaterial } from './wrapFadeMaterial.js'; export class FadeBatchedMesh extends PassThroughBatchedMesh { @@ -40,7 +40,7 @@ export class FadeBatchedMesh extends PassThroughBatchedMesh { // 4 floats per RGBA pixel initialized to white const fadeArray = new Uint8Array( size * size * 2 ); - const fadeTexture = new InstanceDataTexture( fadeArray, size, size, RGFormat, FloatType ); + const fadeTexture = new InstanceDataTexture( fadeArray, size, size, RGFormat, UnsignedByteType ); if ( oldFadeTexture ) {