Qt6 QML Book/图形效果/QML中的图形效果

Effects in QML

QML中的图形效果

In this chapter, we will look at the tools for various effects in QML. The focus will be on:

在本章中,我们将介绍QML中各种效果的工具。重点将放在:

  • Particle Effects
  • 粒子效果
  • Shader Effects
  • 着色器效果

Particle Effects

粒子效果

Particle effects lets us create groups of particles, i.e. instances of a given element. These are generated in a stochastic way and let us work with groups of items rather than individual items. This can be used to create things such as falling leafs, explosions, fire, clouds, and starfields.

粒子效果允许我们创建粒子组,即给定元素的实例。这些数据是以随机方式生成的,让我们处理项目组而不是单个项目。这可以用来创造诸如落叶、爆炸、火、云和星场之类的东西。

Shader Effects

​​​​​​​着色器效果

Shader effects are applied in the graphics rendering pipeline and allows us to change both the size and colour of any visible QML element. This can be used to create transitions such as the genie effect, waves and curtains, or filters such as blur, grayscale, and blending.

着色器效果应用于图形渲染管道,允许我们更改任何可见QML元素清类型的大小和颜色。这可用于创建过渡,如精灵效果、波浪和窗帘,或过滤器,如模糊、灰度和混合。

Shaders are written in a shader language which is then baked and imported into the QML scene, much as other resources. These shaders can then be applied to images or other elements to create advanced visual effects.

着色器使用着色器语言编写,然后烘焙并导入到QML场景中,就像其他资源一样。然后可以将这些着色器应用于图像或其他元素,以创建高级视觉效果。

TIP

Working with shader effects is an advanced topic.

使用着色器效果是一个高级主题。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值