|
10 | 10 | <h1>[name]</h1> |
11 | 11 |
|
12 | 12 | <p class="desc"> |
13 | | - This class generates a Prefiltered, Mipmapped Radiance Environment Map (PMREM) from a cubeMap environment texture. |
14 | | - This allows different levels of blur to be quickly accessed based on material roughness. It is packed into a special |
15 | | - CubeUV format that allows us to perform custom interpolation so that we can support nonlinear formats such as RGBE. |
16 | | - Unlike a traditional mipmap chain, it only goes down to the LOD_MIN level (above), and then creates extra even more |
17 | | - filtered 'mips' at the same LOD_MIN resolution, associated with higher roughness levels. In this way we maintain |
18 | | - resolution to smoothly interpolate diffuse lighting while limiting sampling computation. |
| 13 | + 此类从立方体贴图环境纹理生成经过预过滤的Mipmapped辐射环境贴图(PMREM)。 |
| 14 | + 这允许根据材料粗糙度快速访问不同级别的模糊。 |
| 15 | + 它被打包成一种特殊的CubeUV格式,允许我们执行自定义插值,以便我们可以支持RGBE等非线性格式。 |
| 16 | + 与传统的mipmap链不同,它只下降到LOD_MIN级别(上图),然后以相同的 LOD_MIN 分辨率创建额外的甚至更多的过滤“mips”,并与更高的粗糙度级别相关联。 |
| 17 | + 通过这种方式,我们保持分辨率以平滑地插入漫射照明,同时限制采样计算。 |
19 | 18 | </p> |
20 | 19 |
|
21 | | - <h2>Constructor</h2> |
| 20 | + <h2>构造器(Constructor)</h2> |
22 | 21 |
|
23 | 22 | <h3>[name]( [param:WebGLRenderer renderer] )</h3> |
24 | 23 | <p> |
25 | | - This constructor creates a new [name]. |
| 24 | + 此构造函数创建一个新的[name]。 |
26 | 25 | </p> |
27 | 26 |
|
28 | | - <h2>Methods</h2> |
| 27 | + <h2>方法(Methods)</h2> |
29 | 28 |
|
30 | 29 | <h3>[method:WebGLRenderTarget fromScene]( [param:Scene scene], [param:Number sigma], [param:Number near], [param:Number far] )</h3> |
31 | 30 | <p> |
32 | | - [page:Scene scene] - The given scene.<br> |
33 | | - [page:Number sigma] - (optional) Specifies a blur radius in radians to be applied to the scene before PMREM generation. Default is *0*.<br> |
34 | | - [page:Number near] - (optional) The near plane value. Default is *0.1*.<br> |
35 | | - [page:Number far] - (optional) The far plane value. Default is *100*.<br /><br /> |
| 31 | + [page:Scene scene] - 给定的场景<br> |
| 32 | + [page:Number sigma] - (可选)指定在PMREM生成之前应用于场景的以弧度为单位的模糊半径。默认为0。<br> |
| 33 | + [page:Number near] - (可选)近平面值,默认值为0.1。<br> |
| 34 | + [page:Number far] - (可选)远平面值。默认值为100。<br /><br /> |
36 | 35 |
|
37 | | - Generates a PMREM from a supplied Scene, which can be faster than using an image if networking bandwidth is low. |
38 | | - Optional near and far planes ensure the scene is rendered in its entirety (the cubeCamera is placed at the origin). |
| 36 | + 从提供的场景生成PMREM,如果网络带宽较低,这可能比使用图像更快。可选的近平面和远平面确保场景被完整渲染(cubeCamera放置在原点)。 |
39 | 37 | </p> |
40 | 38 |
|
41 | 39 | <h3>[method:WebGLRenderTarget fromEquirectangular]( [param:Texture equirectangular] )</h3> |
42 | 40 | <p> |
43 | | - [page:Texture equirectangular] - The equirectangular texture.<br /><br /> |
| 41 | + [page:Texture equirectangular] - equirectangular纹理。<br /><br /> |
44 | 42 |
|
45 | | - Generates a PMREM from an equirectangular texture, which can be either LDR or HDR. |
46 | | - The ideal input image size is 1k (1024 x 512), as this matches best with the 256 x 256 cubemap output. |
| 43 | + 从等距柱状纹理生成PMREM,可以是LDR或HDR。理想的输入图像大小为1k(1024x512),因为这与256x256立方体贴图输出最匹配。 |
47 | 44 | </p> |
48 | 45 |
|
49 | 46 | <h3>[method:WebGLRenderTarget fromCubemap]( [param:CubeTexture cubemap] )</h3> |
50 | 47 | <p> |
51 | | - [page:CubeTexture cubemap] - The cubemap texture.<br /><br /> |
| 48 | + [page:CubeTexture cubemap] - 立方体贴图纹理。<br /><br /> |
52 | 49 |
|
53 | | - Generates a PMREM from an cubemap texture, which can be either LDR or HDR. |
54 | | - The ideal input cube size is 256 x 256, as this matches best with the 256 x 256 cubemap output. |
| 50 | + 从立方体贴图纹理生成PMREM,可以是LDR或HDR。理想的输入立方体大小为256x256,因为这与 256x256立方体贴图输出最匹配。 |
55 | 51 | </p> |
56 | 52 |
|
57 | 53 | <h3>[method:undefined compileCubemapShader]()</h3> |
58 | 54 | <p> |
59 | | - Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during your texture's network fetch for increased concurrency. |
| 55 | + 预编译立方体贴图着色器。您可以通过在纹理的网络获取期间调用此方法来提高并发性,从而加快启动速度。 |
60 | 56 | </p> |
61 | 57 |
|
62 | 58 | <h3>[method:undefined compileEquirectangularShader]()</h3> |
63 | 59 | <p> |
64 | | - Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during your texture's network fetch for increased concurrency. |
| 60 | + 预编译等距柱状着色器。您可以通过在纹理的网络获取期间调用此方法来提高并发性,从而加快启动速度。 |
65 | 61 | </p> |
66 | 62 |
|
67 | 63 | <h3>[method:undefined dispose]()</h3> |
68 | 64 | <p> |
69 | | - Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, so you should not need more than one |
70 | | - PMREMGenerator object. If you do, calling dispose() on one of them will cause any others to also become unusable. |
| 65 | + 处理PMREMGenerator的内部存储器。 |
| 66 | + 请注意,PMREMGenerator是一个静态类,因此您不需要多个PMREMGenerator对象。 |
| 67 | + 如果这样做,对其中之一调用dispose()将导致任何其他对象也变得不可用。 |
71 | 68 | </p> |
72 | 69 |
|
73 | | - <h2>Source</h2> |
| 70 | + <h2>源代码(Source)</h2> |
74 | 71 |
|
75 | 72 | <p> |
76 | 73 | [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] |
|
0 commit comments