我在我的R3F应用程序中使用了一个三R3F。不幸的是,它没有纠正伽玛,所以我的视频似乎被冲淡了。我尝试将编码设置为sRGBEncoding,以显示我的纹理,但这似乎没有任何作用。另外,在视频解说的三个文档中没有编码。
如何将RGBEncoding设置为VideoTextures?
提前谢谢。
这是我的纹理:
import {
MeshStandardMaterial,
VideoTexture,
sRGBEncoding,
} from "three";
const textureVid = document.createElement("video");
textureVid.src = "assets/video/test.mp4";
textureVid.play();
const videoTexture = new VideoTexture(textureVid);
videoTexture.encoding = sRGBEncoding;
const matTVScreen = new MeshStandardMaterial({
color: 0x000000,
map: videoTexture,
});发布于 2021-04-23 08:13:59
所以基本上我的代码是对的。为了查看这些更改,我不得不删除浏览器缓存。
https://stackoverflow.com/questions/67213963
复制相似问题