提交 f3397dd5 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #10929 from pailhead/material-secret-methods-documentation

Material customDepthMaterial, customDistanceMaterial, defines documentation
......@@ -100,6 +100,21 @@
This can be used in conjunction with a mesh's [property:Integer renderOrder] property to create invisible objects that occlude other objects. Default is *true*.
</div>
<h3>[property:Material customDepthMaterial]</h3>
<div>
Custom depth material to be used by this material in depth based computation. If a material uses any custom logic to position the vertices (animation, displacement other than the default texture based, instancing...) the depth material should also include that logic in order to make effects like shadows and SSAO work. Defining this property allows the WebGLRenderer to use this instance of the material instead of the internal cache. Default is *undefined*.
</div>
<h3>[property:Material customDistanceMaterial]</h3>
<div>
Same as customDepthMaterial but used for specific computation (point lights for example). Default is *undefined*
</div>
<h3>[property:Object defines]</h3>
<div>
Custom defines to be injected into the shader. These are passed in form of an object literal, with key/value pairs. { MY_CUSTOM_DEFINE: '' , PI2: Math.PI * 2 }. The pairs are defined in both vertex and fragment shaders. Default is *undefined*.
</div>
<h3>[property:Integer depthFunc]</h3>
<div>
Which depth function to use. Default is [page:Materials LessEqualDepth]. See the depth mode [page:Materials constants] for all possible values.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册