summaryrefslogtreecommitdiffstats
path: root/src/graphs3d/qml/resources/BackgroundMaterial.qml
blob: f1ae57c0f3974222d991510a983289f3d7e07972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D

CustomMaterial {
    property TextureInput gridTex: TextureInput {}
    property vector3d scale
    property vector3d margin
    property color gridLineColor
    property color subgridLineColor
    property color baseColor
    property real gridWidth: 0.25
    property bool polar
    property bool xCategory
    property bool zCategory

    property bool gridVisible: true
    property bool baseVisible: true
    property bool gridOnTop: false

    shadingMode: CustomMaterial.Shaded
    cullMode: CustomMaterial.NoCulling
    sourceBlend: baseVisible? CustomMaterial.NoBlend : CustomMaterial.SrcAlpha
    destinationBlend: baseVisible? CustomMaterial.NoBlend : CustomMaterial.OneMinusSrcAlpha
    fragmentShader: "qrc:/shaders/backgroundgridfrag"
}