Abstract base type providing functionality common to materials. 更多...
导入语句: | import QtQuick3D |
继承: | Object3D |
继承者: | CustomMaterial , DefaultMaterial ,和 PrincipledMaterial |
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.
常量 | 描述 |
---|---|
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
被设为
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
常量 | 描述 |
---|---|
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. |
注意:
若
SceneEnvironment::depthPrePassEnabled
被设为
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.
另请参阅 SceneEnvironment::lightProbe .