这是skybox的代码:
const { scene } = useThree(); const texture = useLoader(TextureLoader, "textures/skybox.jpg"); scene.background = texture;
(不要担心模糊。这只是因为我在屏幕上拍摄了一个如此小的区域。)
我问的是我在Poimandres Discord服务器中询问的亮度,其中一位管理员说这可能是一个编码错误,并在这里提问。
感谢马奎佐解决了这个问题。我刚刚补充说 texture.encoding = THREE.sRGBEncoding;
texture.encoding = THREE.sRGBEncoding;
这可能是你的 texture encoding property 默认情况下,纹理使用线性,但对于不与照明交互的直背景JPG,可以使用sRGB。
const texture = useLoader(TextureLoader, "textures/skybox.jpg"); texture.encoding = THREE.sRGBEncoding; scene.background = texture;