Parcourir la source

Docs: Improve Material page (en/fr) (#30118)

* Docs: Add TSL example for the onBeforeCompile method in Material

* Implements review feedbacks
Boris Ghidaglia il y a 1 an
Parent
commit
f6fd36c5ea
2 fichiers modifiés avec 6 ajouts et 2 suppressions
  1. 3 1
      docs/api/en/materials/Material.html
  2. 3 1
      docs/api/fr/materials/Material.html

+ 3 - 1
docs/api/en/materials/Material.html

@@ -417,7 +417,9 @@
 		<p>
 			An optional callback that is executed immediately before the shader
 			program is compiled. This function is called with the shader source code
-			as a parameter. Useful for the modification of built-in materials.
+			as a parameter. Useful for the modification of built-in materials, but the
+			recommended approach moving forward is to use `WebGPURenderer` with the new
+			Node Material system and [link:https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language TSL].
 		</p>
 		<p>
 			Unlike properties, the callback is not supported by [page:Material.clone .clone](), 

+ 3 - 1
docs/api/fr/materials/Material.html

@@ -350,7 +350,9 @@
 		<h3>[method:undefined onBeforeCompile]( [param:Shader shader], [param:WebGLRenderer renderer] )</h3>
 		<p>
 			Un callback facultatif qui est exécuté immédiatement avant la compilation du programme shader.
-			Cette fonction est appelée avec le code source du shader comme paramètre. Utile pour la modification des matériaux intégrés.
+			Cette fonction est appelée avec le code source du shader comme paramètre. Utile pour la modification des matériaux intégrés, 
+			bien que la nouvelle méthode recommandée soit d'utiliser `WebGPURenderer` avec le nouveau système de Node Material et
+			[link:https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language TSL].
 		</p>
 		<p>
 			Contrairement aux propriétés, le callback n'est pas pris en charge par [page:Material.clone .clone](), [page:Material.copy .copy]() et [page:Material.toJSON .toJSON]().

粤ICP备19079148号