12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../../" />
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- <h1>[name]</h1>
- <p class="desc">
- This class generates a Prefiltered, Mipmapped Radiance Environment Map (PMREM) from a cubeMap environment texture.
- This allows different levels of blur to be quickly accessed based on material roughness. It is packed into a special
- CubeUV format that allows us to perform custom interpolation so that we can support nonlinear formats such as RGBE.
- Unlike a traditional mipmap chain, it only goes down to the LOD_MIN level (above), and then creates extra even more
- filtered 'mips' at the same LOD_MIN resolution, associated with higher roughness levels. In this way we maintain
- resolution to smoothly interpolate diffuse lighting while limiting sampling computation.
- </p>
- <h2>Constructor</h2>
- <h3>[name]( [param:WebGLRenderer renderer] )</h3>
- <p>
- This constructor creates a new [name].
- </p>
- <h2>Methods</h2>
- <h3>[method:WebGLRenderTarget fromScene]( [param:Scene scene], [param:Number sigma], [param:Number near], [param:Number far] )</h3>
- <p>
- [page:Scene scene] - The given scene.<br>
- [page:Number sigma] - (optional) Specifies a blur radius in radians to be applied to the scene before PMREM generation. Default is *0*.<br>
- [page:Number near] - (optional) The near plane value. Default is *0.1*.<br>
- [page:Number far] - (optional) The far plane value. Default is *100*.<br /><br />
- Generates a PMREM from a supplied Scene, which can be faster than using an image if networking bandwidth is low.
- Optional near and far planes ensure the scene is rendered in its entirety (the cubeCamera is placed at the origin).
- </p>
- <h3>[method:WebGLRenderTarget fromEquirectangular]( [param:Texture equirectangular] )</h3>
- <p>
- [page:Texture equirectangular] - The equirectangular texture.<br /><br />
- Generates a PMREM from an equirectangular texture, which can be either LDR (RGBFormat) or HDR (RGBEFormat).
- The ideal input image size is 1k (1024 x 512), as this matches best with the 256 x 256 cubemap output.
- </p>
- <h3>[method:WebGLRenderTarget fromCubemap]( [param:CubeTexture cubemap] )</h3>
- <p>
- [page:CubeTexture cubemap] - The cubemap texture.<br /><br />
- Generates a PMREM from an cubemap texture, which can be either LDR (RGBFormat) or HDR (RGBEFormat).
- The ideal input cube size is 256 x 256, as this matches best with the 256 x 256 cubemap output.
- </p>
- <h3>[method:void compileCubemapShader]()</h3>
- <p>
- Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during your texture's network fetch for increased concurrency.
- </p>
- <h3>[method:void compileEquirectangularShader]()</h3>
- <p>
- Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during your texture's network fetch for increased concurrency.
- </p>
- <h3>[method:void dispose]()</h3>
- <p>
- Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, so you should not need more than one
- PMREMGenerator object. If you do, calling dispose() on one of them will cause any others to also become unusable.
- </p>
- <h2>Source</h2>
- <p>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </p>
- </body>
- </html>
|