three.js skydome with gradient

坚强是说给别人听的谎言 提交于 2019-12-06 08:09:27

Here are two three.js examples in which a skydome with a gradient is created. They do not involve EffectComposer or disabling depth test.

http://mrdoob.github.com/three.js/examples/webgl_lights_hemisphere.html

http://mrdoob.github.com/three.js/examples/webgl_materials_lightmap.html

three.js r.55

You dont have to use a cone or other 3D-geometry to simulate a gradient sky. I solved it using a canvas (with 3 gradient-spots, lightblue -> white (horizon) -> darkblue) and draw it as sprite in front of my camera with the right distance to it (fog-distance). You only have to manage the distance when moving/rotating your cam. Tip: Use mesh.scale.set (xx,xx,1) to zoom the canvas-texture to needed size.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!