TextureInput QML Type

指定暴露给CustomMaterial 或效果的着色器的纹理。更多

Import Statement: import QtQuick3D
Inherits:

QtObject

属性

详细说明

这是一种可用于将Texture 暴露给着色器的类型,可在Effectrender pass 中使用,也可在CustomMaterial 中使用。它主要用于为Texture 分配一个本地名称,以便着色器引用。

EffectCustomMaterial 中声明纹理输入(TextureInput)属性后,所有着色器都将自动以其属性名作为采样器使用该属性。

属性文档

enabled : bool

该属性决定该TextureInput 是否启用。默认值为 true。禁用时,效果的着色器会采样一个不透明的黑色虚拟纹理,而不是texture 指定的纹理。


texture : Texture

TextureInput 所对应的纹理为间接纹理。


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.