LightProbe.html 2.3 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. Light probes are an alternative way of adding light to a 3D scene. Unlike classical light sources (e.g. directional,
  14. point or spot lights), light probes do not emit light. Instead they store information about light passing through
  15. 3D space. During rendering, the light that hits a 3D object is approximated by using the data from the light probe.
  16. </p>
  17. <p class="desc">
  18. Light probes are usually created from (radiance) environment maps. The class [page:LightProbeGenerator] can
  19. be used to create light probes from instances of [page:CubeTexture] or [page:WebGLCubeRenderTarget].
  20. However, light estimation data could also be provided in other forms e.g. by WebXR. This enables the rendering
  21. of augmented reality content that reacts to real world lighting.
  22. </p>
  23. <p class="desc">
  24. The current probe implementation in three.js supports so-called diffuse light probes. This type of light probe
  25. is functionally equivalent to an irradiance environment map.
  26. </p>
  27. <h2>Examples</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>Constructor</h2>
  33. <h3>[name]( [param:SphericalHarmonics3 sh], [param:Float intensity] )</h3>
  34. <p>
  35. [page:SphericalHarmonics3 sh] - (optional) An instance of [page:SphericalHarmonics3].<br />
  36. [page:Float intensity] - (optional) Numeric value of the light probe's intensity. Default is 1.<br /><br />
  37. Creates a new [name].
  38. </p>
  39. <h2>Properties</h2>
  40. <p>
  41. See the base [page:Light Light] class for common properties. The [page:Light.color color] property is currently
  42. not evaluated and thus has no effect.
  43. </p>
  44. <h3>[property:SphericalHarmonics3 sh]</h3>
  45. <p>
  46. A light probe uses spherical harmonics to encode lighting information.
  47. </p>
  48. <h2>Methods</h2>
  49. <p>
  50. See the base [page:Light Light] class for common methods.
  51. </p>
  52. <h2>Source</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>