LightProbe.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Object3D] &rarr; [page:Light] &rarr;
  11. <h1>光照探针[name]</h1>
  12. <p class="desc">
  13. 光照探针是一种在3D场景中添加光源的另一种方法。与经典光源(平行光、点光、聚光)不同,
  14. 光照探针不发光。相反,光照探针存储着有关穿过3D空间的光线的信息。
  15. 渲染过程中,通过使用来自光照探针的数据,来逼近打到3D物体上的光线。
  16. </p>
  17. <p class="desc">
  18. 光照探针通常从(辐射)环境贴图中创建。 [page:LightProbeGenerator] 类可以根据 [page:CubeTexture] 或
  19. [page:WebGLCubeRenderTarget] 的实例来创建光照探针。
  20. 但是,光照估算数据同样可以以其他形式提供,例如,通过WebXR。
  21. 这将能够渲染可对真实世界的光照做出反应的增强现实内容。
  22. </p>
  23. <p class="desc">
  24. three.js中,当前的探针实现支持所谓的漫反射光照探针。
  25. 这种类型的光照探针功能上等效于辐照环境贴图。
  26. </p>
  27. <h2>例子</h2>
  28. <p>
  29. [example:webgl_lightprobe WebGL / light probe ]<br />
  30. [example:webgl_lightprobe_cubecamera WebGL / light probe / cube camera ]
  31. </p>
  32. <h2>构造函数</h2>
  33. <h3>[name]( [param:SphericalHarmonics3 sh], [param:Float intensity] )</h3>
  34. <p>
  35. [page:SphericalHarmonics3 sh] - (可选)一个[page:SphericalHarmonics3]的实例。<br />
  36. [page:Float intensity] - (可选)光照探针强度的数值。默认值为1。<br /><br />
  37. 创建一个新的 [name] 。
  38. </p>
  39. <h2>属性</h2>
  40. <p>
  41. See the base [page:Light Light] class for common properties.
  42. [page:Light.color color] 属性当前未做评估,因此不生效。
  43. </p>
  44. <h3>[property:SphericalHarmonics3 sh]</h3>
  45. <p>
  46. 光照探针使用球面谐波(spherical harmonic)来编码光照信息。
  47. </p>
  48. <h2>方法</h2>
  49. <p>
  50. See the base [page:Light Light] class for common methods.
  51. </p>
  52. <h2>源码</h2>
  53. <p>
  54. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  55. </p>
  56. </body>
  57. </html>