Его*_*лич 2 javascript php three.js hdr
我在代码中重复这个例子:
https://trijs.org/examples/?q=RGBELoader#webgl_loader_gltf
来源: https ://github.com/mrdoob/ Three.js/blob/master/examples/webgl_loader_gltf.html#L53
HDRI 照明效果很好。但我无法从背景中隐藏 hdr 地图。有办法做到这一点吗?保留此 hdri 闪电并设置自定义背景颜色。
使用您提供的示例,假设您想保留头盔上照片的反射,但从背景中删除照片,您所要做的就是删除(或注释掉)以下行:
scene.background = cubeGenerator.renderTarget;
Run Code Online (Sandbox Code Playgroud)
这将从背景中删除照片,然后背景将显示为默认颜色(黑色),如您从以下屏幕截图中看到的: