summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJere Tuliniemi <jere.tuliniemi@qt.io>2020-03-05 13:36:48 +0200
committerJere Tuliniemi <jere.tuliniemi@qt.io>2020-03-09 10:21:32 +0200
commit567a13e6473e29601fc5da28945c102f2dab7f3b (patch)
tree48f350ea41dd77eb6225b90be37876300a433bb2 /doc
parent27247ff41708c3de59aa532691adb1fd8de48902 (diff)
Document depth function in custom shaders
Also links different custom shader documents that all provide different related information. Task-number: QT3DS-3821 Change-Id: Ifa4765aee25bada3f4b988abfb7c2becb692623c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/src/07-file-formats/5-custom-material-reference.qdoc3
-rw-r--r--doc/src/07-file-formats/custom-materials-effects.qdoc36
2 files changed, 39 insertions, 0 deletions
diff --git a/doc/src/07-file-formats/5-custom-material-reference.qdoc b/doc/src/07-file-formats/5-custom-material-reference.qdoc
index 14fc4ce0..26cb56bd 100644
--- a/doc/src/07-file-formats/5-custom-material-reference.qdoc
+++ b/doc/src/07-file-formats/5-custom-material-reference.qdoc
@@ -48,6 +48,9 @@ index-of-refraction and fragment cutoff(masking).
It is also possible to write custom material without using the boilerplate code,
in which case the main function must be implemented in the shader.
+For more information on the XML format see \l{Custom Materials and Effects} and
+\l{Effect Reference}.
+
\note Some characters used in shader code such as '<' break the XML parsing.
It is advisable to surround any shader code with <![CDATA[]]> to enable use of such characters.
Example usage:
diff --git a/doc/src/07-file-formats/custom-materials-effects.qdoc b/doc/src/07-file-formats/custom-materials-effects.qdoc
index 7a1521cc..646245ca 100644
--- a/doc/src/07-file-formats/custom-materials-effects.qdoc
+++ b/doc/src/07-file-formats/custom-materials-effects.qdoc
@@ -304,4 +304,40 @@ identifier-like name.
<Shader name="tonemap">
\endcode
+\section2 \c{<Passes>}
+The \c{<Passes>} element can contain \c{<Pass>} elements.
+
+\section2 \c{<Pass>}
+The \c{<Pass>} element contains different properties that are applied to the pass. More details
+are provided in the \l{Effect Reference}.
+
+\section2 <Depth>
+Custom materials have an additional Depth pass element not provided to effects. It determines
+the depth function and masking used during this pass of the custom shader.
+
+The element attributes are:
+\table
+\header
+ \li attribute
+ \li values
+ \li description
+\row
+ \li func
+ \li \list
+ \li \c never
+ \li \c less
+ \li \c less-than-or-equal
+ \li \c equal
+ \li \c not-equal
+ \li \c greater
+ \li \c greater-than-or-equal
+ \li \c always
+ \endlist
+ \li Specifies the depth function used.
+\row
+ \li mask
+ \li bool
+ \li Specifies if depth is written or not. With "true" depth is written, with "false" it's not.
+\endtable
+
*/