Material QML Type▲
-
Import Statement: import QtQuick3D
-
Inherited By:: CustomMaterial, DefaultMaterial, PrincipledMaterial, and SpecularGlossyMaterial
-
Inherits:: Object3D
Detailed Description▲
Property Documentation▲
cullMode : enumeration▲
This property defines whether primitive culling is enabled, and, when enabled, which primitives are discarded.
The default value is Material.BackFaceCulling.
A triangle is considered front-facing if it has a counter-clockwise winding, meaning its vertices in framebuffer coordinates are in counter-clockwise order.
Constant |
Description |
---|---|
Material.BackFaceCulling |
Back-facing triangles are discarded. |
Material.FrontFaceCulling |
Front-facing triangles are discarded. |
Material.NoCulling |
No triangles are discarded. |
depthDrawMode : enumeration▲
This property determines if and when depth rendering takes place for this material. The default behavior when SceneEnvironment::depthTestEnabled is set to true is that during the main render pass only opaque materials will write to the depth buffer. This property makes it possible to change this behavior to fine tune the rendering of a material.
The default value is Material.OqaqueOnlyDepthDraw
Constant |
Description |
---|---|
Material.OpaqueOnlyDepthDraw |
Depth rendering is only performed if the material is opaque. |
Material.AlwaysDepthDraw |
Depth rendering is always performed regardless of the material type. |
Material.NeverDepthDraw |
Depth rendering is never performed. |
Material.OpaquePrePassDepthDraw |
Depth rendering is performed in a separate depth pass, but only opaque values are written. This mode also enables transparent materials to be used in combination with shadows. |
If SceneEnvironment::depthPrePassEnabled is set to true then all depth writes will take place as a result of the depth prepass, but it is still necessary to explicitly set Material.OpaquePrePassDepthDraw to only write the opaque fragments in the depth and shadow passes.
lightProbe : Texture▲
This property defines a Texture for overriding or setting an image based lighting Texture for use with this material only.
Setting a light probe on the material will override the scene's light probe for models using this material.
This property is ignored when Reflection Probe is used to show reflections on the Model using this material because Reflection Probe uses the scene's light probe.
See Also▲
See also SceneEnvironment::lightProbe