Browse Source

Docs: Improve Material page. (#25340)

Michael Herzog 2 years ago
parent
commit
3dc8e20e4a

+ 9 - 0
docs/api/en/materials/Material.html

@@ -128,6 +128,15 @@
 		When drawing 2D overlays it can be useful to disable the depth writing in order to layer several things together without creating z-index artifacts.
 		When drawing 2D overlays it can be useful to disable the depth writing in order to layer several things together without creating z-index artifacts.
 		</p>
 		</p>
 
 
+		<h3>[property:Boolean forceSinglePass]</h3>
+		<p>
+		Whether double-sided, transparent objects should be rendered with a single pass or not. Default is `false`.<br /><br />
+
+		The engine renders double-sided, transparent objects with two draw calls (back faces first, then front faces) to mitigate transparency artifacts.
+		There are scenarios however where this approach produces no quality gains but still doubles draw calls e.g. when rendering flat vegetation like grass sprites. 
+		In these cases, set the `forceSinglePass` flag to `false` to disable the two pass rendering to avoid performance issues.
+		</p>
+
 		<h3>[property:Boolean isMaterial]</h3>
 		<h3>[property:Boolean isMaterial]</h3>
 		<p>
 		<p>
 			Read-only flag to check if a given object is of type [name].
 			Read-only flag to check if a given object is of type [name].

+ 9 - 0
docs/api/it/materials/Material.html

@@ -137,6 +137,15 @@
 			cose insieme senza creare artefatti z.index.
 			cose insieme senza creare artefatti z.index.
 		</p>
 		</p>
 
 
+		<h3>[property:Boolean forceSinglePass]</h3>
+		<p>
+		Whether double-sided, transparent objects should be rendered with a single pass or not. Default is `false`.<br /><br />
+
+		The engine renders double-sided, transparent objects with two draw calls (back faces first, then front faces) to mitigate transparency artifacts.
+		There are scenarios however where this approach produces no quality gains but still doubles draw calls e.g. when rendering flat vegetation like grass sprites. 
+		In these cases, set the `forceSinglePass` flag to `false` to disable the two pass rendering to avoid performance issues.
+		</p>
+
 		<h3>[property:Boolean isMaterial]</h3>
 		<h3>[property:Boolean isMaterial]</h3>
 		<p>
 		<p>
 			Flag di sola lettura per  verificare se l'oggetto dato è di tipo [name].
 			Flag di sola lettura per  verificare se l'oggetto dato è di tipo [name].

+ 13 - 4
docs/api/zh/materials/Material.html

@@ -107,10 +107,19 @@
 	在绘制2D叠加时,将多个事物分层在一起而不创建z-index时,禁用深度写入会很有用。
 	在绘制2D叠加时,将多个事物分层在一起而不创建z-index时,禁用深度写入会很有用。
 </p>
 </p>
 
 
-		<h3>[property:Boolean isMaterial]</h3>
-		<p>
-			检查这个对象是否为材质[name]的只读标记.
-		</p>
+<h3>[property:Boolean forceSinglePass]</h3>
+<p>
+Whether double-sided, transparent objects should be rendered with a single pass or not. Default is `false`.<br /><br />
+
+The engine renders double-sided, transparent objects with two draw calls (back faces first, then front faces) to mitigate transparency artifacts.
+There are scenarios however where this approach produces no quality gains but still doubles draw calls e.g. when rendering flat vegetation like grass sprites. 
+In these cases, set the `forceSinglePass` flag to `false` to disable the two pass rendering to avoid performance issues.
+</p>
+
+<h3>[property:Boolean isMaterial]</h3>
+<p>
+	检查这个对象是否为材质[name]的只读标记.
+</p>
 
 
 <h3>[property:Boolean stencilWrite]</h3>
 <h3>[property:Boolean stencilWrite]</h3>
 <p>
 <p>