blob: fa14da18e5699a74b5ba3033a269e7127e1879e3 (
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
28
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick3D
import QtQuick
CustomMaterial {
property real gradientPos: 0.0
property TextureInput custex: TextureInput {}
property int colorStyle
property color uColor
property bool usePoint
property bool transparency: false
property real rootScale
property real specularBrightness: 0.25
readonly property real shininess: (1.0 - specularBrightness) * 100
property bool shaded: false
shadingMode: CustomMaterial.Shaded
sourceBlend: !transparency ? CustomMaterial.NoBlend : CustomMaterial.SrcAlpha
destinationBlend: !transparency ? CustomMaterial.NoBlend : CustomMaterial.OneMinusSrcAlpha
depthDrawMode: !transparency ? Material.OpaqueOnlyDepthDraw : Material.OpaquePrePassDepthDraw
vertexShader: "qrc:/shaders/scatterinstancingvert"
fragmentShader: "qrc:/shaders/scatterinstancingfrag"
}
|