Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 23 additions & 26 deletions docs/api/zh/extras/PMREMGenerator.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,64 @@
<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.
此类从立方体贴图环境纹理生成经过预过滤的Mipmapped辐射环境贴图(PMREM)。
这允许根据材料粗糙度快速访问不同级别的模糊。
它被打包成一种特殊的CubeUV格式,允许我们执行自定义插值,以便我们可以支持RGBE等非线性格式。
与传统的mipmap链不同,它只下降到LOD_MIN级别(上图),然后以相同的 LOD_MIN 分辨率创建额外的甚至更多的过滤“mips”,并与更高的粗糙度级别相关联。
通过这种方式,我们保持分辨率以平滑地插入漫射照明,同时限制采样计算。
</p>

<h2>Constructor</h2>
<h2>构造器(Constructor</h2>

<h3>[name]( [param:WebGLRenderer renderer] )</h3>
<p>
This constructor creates a new [name].
此构造函数创建一个新的[name]
</p>

<h2>Methods</h2>
<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 />
[page:Scene scene] - 给定的场景<br>
[page:Number sigma] - (可选)指定在PMREM生成之前应用于场景的以弧度为单位的模糊半径。默认为0。<br>
[page:Number near] - (可选)近平面值,默认值为0.1。<br>
[page:Number far] - (可选)远平面值。默认值为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).
从提供的场景生成PMREM,如果网络带宽较低,这可能比使用图像更快。可选的近平面和远平面确保场景被完整渲染(cubeCamera放置在原点)。
</p>

<h3>[method:WebGLRenderTarget fromEquirectangular]( [param:Texture equirectangular] )</h3>
<p>
[page:Texture equirectangular] - The equirectangular texture.<br /><br />
[page:Texture equirectangular] - equirectangular纹理。<br /><br />

Generates a PMREM from an equirectangular texture, which can be either LDR or HDR.
The ideal input image size is 1k (1024 x 512), as this matches best with the 256 x 256 cubemap output.
从等距柱状纹理生成PMREM,可以是LDR或HDR。理想的输入图像大小为1k(1024x512),因为这与256x256立方体贴图输出最匹配。
</p>

<h3>[method:WebGLRenderTarget fromCubemap]( [param:CubeTexture cubemap] )</h3>
<p>
[page:CubeTexture cubemap] - The cubemap texture.<br /><br />
[page:CubeTexture cubemap] - 立方体贴图纹理。<br /><br />

Generates a PMREM from an cubemap texture, which can be either LDR or HDR.
The ideal input cube size is 256 x 256, as this matches best with the 256 x 256 cubemap output.
从立方体贴图纹理生成PMREM,可以是LDR或HDR。理想的输入立方体大小为256x256,因为这与 256x256立方体贴图输出最匹配。
</p>

<h3>[method:undefined 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:undefined 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:undefined 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.
处理PMREMGenerator的内部存储器。
请注意,PMREMGenerator是一个静态类,因此您不需要多个PMREMGenerator对象。
如果这样做,对其中之一调用dispose()将导致任何其他对象也变得不可用。
</p>

<h2>Source</h2>
<h2>源代码(Source</h2>

<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
Expand Down