ChromaticAberration.qml 728 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (C) 2020 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
  3. import QtQuick
  4. import QtQuick3D
  5. Effect {
  6. property TextureInput maskTexture: TextureInput {
  7. texture: Texture {
  8. source: "qrc:/qtquick3deffects/maps/white.png"
  9. tilingModeHorizontal: Texture.Repeat
  10. tilingModeVertical: Texture.Repeat
  11. }
  12. }
  13. property real aberrationAmount: 50
  14. property real focusDepth: 600
  15. Shader {
  16. id: chromaticAberration
  17. stage: Shader.Fragment
  18. shader: "qrc:/qtquick3deffects/shaders/chromaticaberration.frag"
  19. }
  20. passes: [
  21. Pass {
  22. shaders: [ chromaticAberration ]
  23. }
  24. ]
  25. }