TextureInput QML Type

Specifies a texture exposed to the shaders of a CustomMaterial or Effect. 更多...

导入语句: import QtQuick3D

特性

详细描述

This is a type which can be used for exposing a Texture to a shader, either in the render pass of an Effect , or in a CustomMaterial . It exists primarily to assign a local name to the Texture that can be referenced from shaders.

When a TextureInput property is declared in an Effect CustomMaterial , it will automatically be available as a sampler in all shaders by its property name.

特性文档编制

enabled : bool

The property determines if this TextureInput is enabled. The default value is true. When disabled, the shaders of the effect sample a dummy, opaque black texture instead of the one specified by texture .

texture : Texture

The texture for which this TextureInput serves as an indirection.