comparing methods of creating skybox material in three.js

后端 未结 1 1715
清歌不尽
清歌不尽 2021-01-14 10:31

When it comes to making skyboxes in three.js, I have seen two different schools of thought. Assuming that we have the code

var imagePrefix = \"images/mountai         


        
相关标签:
1条回答
  • 2021-01-14 10:54

    You have a conceptual misunderstanding.

    For WebGL, both methods involve shaders. MeshBasicMaterial has a vertex and fragment shader that has been written for you for convenience.

    The primary difference between the two examples is the second example uses a cube map for input.

    You would use that approach if you were already using the same cube map as an environment map in a reflective material, for example.

    The first example is just another way to render a skybox, and is the only one of the two that will work with CanvasRenderer.

    three.js r.58

    0 讨论(0)
提交回复
热议问题