浏览代码

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

Material customDepthMaterial, customDistanceMaterial, defines documentation
Mr.doob 8 年之前
父节点
当前提交
f3397dd543
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15 0
      docs/api/materials/Material.html

+ 15 - 0
docs/api/materials/Material.html

@@ -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.