plane = {
const w = 47;
const h = 37;
const texture = new THREE.DataTexture(TestData, w, h);
texture.format = THREE.RedFormat;
texture.minFilter = texture.magFilter = THREE.LinearFilter;
texture.unpackAlignment = 1;
texture.needsUpdate = true;
const material = new THREE.ShaderMaterial({
uniforms: {
u_texture: { value: texture },
},
vertexShader: vertexShader,
fragmentShader: fragmentShader,
})
const geometry = new THREE.PlaneBufferGeometry(width, height);
const plane = new THREE.Mesh(geometry, material);
return plane;
}