My video texture’s resolution seems lower than the video file, how can I custom it?
code here:
//Get your video element:
const video = document.createElement('video');
video.autoplay = true;
video.muted = true;
video.loop = true;
video.src = "../assets/img/01.mp4";
// const video = document.getElementById("video");
video.onloadeddata = function () {
video.play();
};
//Create your video texture:
videoTexture = new THREE.VideoTexture(video);
videoTexture.magFilter = THREE.NearestFilter;
const videoMaterial = new THREE.MeshBasicMaterial({
map: videoTexture,
side: THREE.FrontSide
});
videoMaterial.needsUpdate = true;
//Create screen
const screen = new THREE.PlaneGeometry(100, 100);
const videoScreen = new THREE.Mesh(screen, videoMaterial);
videoScreen.position.set(0, 0, 0);
scene.background = videoTexture;
the video:
on web: