被照亮的对象的纹理在aframe

Nik*_*ang 8 shader aframe

有没有办法在aframe中为照明对象部件设置特殊纹理?例如,我想为地球设置夜间纹理,其中未被照亮的一侧具有另一种纹理.

编辑:我似乎需要某种着色器,但我找不到任何有用的问题.

编辑2:着色器必须灵活,并且必须使用不同类型的光源和不是完美球体的对象.

小智 1

 I Hope this will solve your issue


<!DOCTYPE html>
<html>
  <head>
    <title>Hello, WebVR! - A-Frame</title>
    <meta name="description" content="Hello, WebVR! - A-Frame">
    <script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script>
  </head>
  <body>
    <a-scene>
      <a-box position="-1 0.5 -3" rotation="0 45 0" width="1" height="3" color="#4CC3D9" shadow></a-box>     
      <a-plane position="0 0 -3" rotation="-90 0 0" width="4" height="4" color="#7BC8A4" shadow></a-plane>
      <a-sky color="#ECECEC"></a-sky>
    </a-scene>
  </body>
</html>
Run Code Online (Sandbox Code Playgroud)