TextureInput QML Type
指定一个向CustomMaterial 或Effect的着色器公开的纹理。更多...
| Import Statement: | import QtQuick3D |
| Inherits: |
属性
详细说明
这是一个可用于将Texture 暴露给着色器的类型,既可在Effect 的render pass 中使用,也可在CustomMaterial 中使用。其主要作用是为Texture 分配一个本地名称,以便着色器能够引用该资源。
当在Effect 或CustomMaterial 中声明TextureInput属性时,该属性将自动作为采样器(sampler)在所有着色器中可用,并通过其属性名称进行引用。
属性文档
enabled : bool
该属性用于确定此“TextureInput ”是否启用。默认值为 true。当禁用时,该效果的着色器将采样一个虚的、不透明的黑色纹理,而不是由 `texture` 指定的纹理。
texture : Texture
此TextureInput 所间接引用的纹理。
© 2026 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.