提交 1bae4e95 编写于 作者: M Mugen87

Docs: Update LightShadow.

上级 1cd928aa
......@@ -28,6 +28,12 @@
<h2>Properties</h2>
<h3>[property:Boolean autoUpdate]</h3>
<p>
Enables automatic updates of the light's shadow. Default is *true*.
If you do not require dynamic lighting / shadows, you may set this to *false*.
</p>
<h3>[property:Camera camera]</h3>
<p>
The light's view of the world. This is used to generate a depth map of the scene; objects behind
......@@ -40,10 +46,6 @@
The default is 0. Very tiny adjustments here (in the order of 0.0001) may help reduce artefacts in shadows
</p>
<h3>[property:Float normalBias]</h3>
<p>Defines how much the position used to query the shadow map is offset along the object normal.</p>
<p>The default is 0. Increasing this value can be used to reduce shadow acne especially in large scenes where light shines onto geometry at a shallow angle. The cost is that shadows may appear distorted.</p>
<h3>[property:WebGLRenderTarget map]</h3>
<p>
The depth map generated using the internal camera; a location beyond a pixel's depth is
......@@ -72,6 +74,18 @@
in a [page:Matrix4 Matrix4]. This is computed internally during rendering.
</p>
<h3>[property:Boolean needsUpdate]</h3>
<p>
When set to *true*, shadow maps will be updated in the next *render* call. Default is *false*.
If you have set [page:.autoUpdate] to *false*, you will need to set this property to *true* and then make a render call to update the light's shadow.
</p>
<h3>[property:Float normalBias]</h3>
<p>
Defines how much the position used to query the shadow map is offset along the object normal.
The default is 0. Increasing this value can be used to reduce shadow acne especially in large scenes where light shines onto geometry at a shallow angle. The cost is that shadows may appear distorted.
</p>
<h3>[property:Float radius]</h3>
<p>
Setting this to values greater than 1 will blur the edges of the shadow.<br />
......
......@@ -27,6 +27,12 @@
<h2>属性</h2>
<h3>[property:Boolean autoUpdate]</h3>
<p>
Enables automatic updates of the light's shadow. Default is *true*.
If you do not require dynamic lighting / shadows, you may set this to *false*.
</p>
<h3>[property:Camera camera]</h3>
<p>
光的世界里。这用于生成场景的深度图;从光的角度来看,其他物体背后的物体将处于阴影中。
......@@ -38,10 +44,6 @@
默认值为0.此处非常小的调整(大约0.0001)可能有助于减少阴影中的伪影
</p>
<h3>[property:Float normalBias]</h3>
<p>Defines how much the position used to query the shadow map is offset along the object normal.</p>
<p>The default is 0. Increasing this value can be used to reduce shadow acne especially in large scenes where light shines onto geometry at a shallow angle. The cost is that shadows may appear distorted.</p>
<h3>[property:WebGLRenderTarget map]</h3>
<p>
使用内置摄像头生成的深度图;超出像素深度的位置在阴影中。在渲染期间内部计算。
......@@ -49,7 +51,7 @@
<h3>[property:WebGLRenderTarget mapPass]</h3>
<p>
The distribution map generated using the internal camera; an occlusion is calculated based
The distribution map generated using the internal camera; an occlusion is calculated based
on the distribution of depths. Computed internally during rendering.
</p>
......@@ -68,20 +70,32 @@
模拟阴影相机空间,计算阴影贴图中的位置和深度。存储在[page:Matrix4 Matrix4]中。这是在渲染期间内部计算的。
</p>
<h3>[property:Boolean needsUpdate]</h3>
<p>
When set to *true*, shadow maps will be updated in the next *render* call. Default is *false*.
If you have set [page:.autoUpdate] to *false*, you will need to set this property to *true* and then make a render call to update the light's shadow.
</p>
<h3>[property:Float normalBias]</h3>
<p>
Defines how much the position used to query the shadow map is offset along the object normal.
The default is 0. Increasing this value can be used to reduce shadow acne especially in large scenes where light shines onto geometry at a shallow angle. The cost is that shadows may appear distorted.
</p>
<h3>[property:Float radius]</h3>
<p>
将此值设置为大于1的值将模糊阴影的边缘。<br />
较高的值会在阴影中产生不必要的条带效果 - 更大的[page:.mapSize mapSize]将允许在这些效果变得可见之前使用更高的值。<br />
If [page:WebGLRenderer.shadowMap.type] is set to [page:Renderer PCFSoftShadowMap], radius has
If [page:WebGLRenderer.shadowMap.type] is set to [page:Renderer PCFSoftShadowMap], radius has
no effect and it is recommended to increase softness by decreasing [page:.mapSize mapSize] instead.<br /><br />
请注意,如果[page:WebGLRenderer.shadowMap.type]设置为[page:Renderer BasicShadowMap],将会无效。
</p>
<h2>方法</h2>
<h3>[method:Vector2 getFrameExtents]()</h3>
<p>
Used internally by the renderer to extend the shadow map to contain all viewports
......
......@@ -17,6 +17,8 @@ export class LightShadow {
map: RenderTarget;
mapPass: RenderTarget;
matrix: Matrix4;
autoUpdate: boolean;
needsUpdate: boolean;
copy( source: LightShadow ): this;
clone( recursive?: boolean ): this;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册