/
UvPropertyGroup.json
85 lines (85 loc) · 2.67 KB
/
UvPropertyGroup.json
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
"name": "uv",
"displayName": "UVs",
"description": "Properties for configuring UV transforms.",
"properties": [
{
"name": "center",
"displayName": "Center",
"description": "Center point for scaling and rotation transformations.",
"type": "vector2",
"vectorLabels": [ "U", "V" ],
"defaultValue": [ 0.5, 0.5 ]
},
{
"name": "tileU",
"displayName": "Tile U",
"description": "Scales texture coordinates in U.",
"type": "float",
"defaultValue": 1.0,
"step": 0.1
},
{
"name": "tileV",
"displayName": "Tile V",
"description": "Scales texture coordinates in V.",
"type": "float",
"defaultValue": 1.0,
"step": 0.1
},
{
"name": "offsetU",
"displayName": "Offset U",
"description": "Offsets texture coordinates in the U direction.",
"type": "float",
"defaultValue": 0.0,
"min": -1.0,
"max": 1.0
},
{
"name": "offsetV",
"displayName": "Offset V",
"description": "Offsets texture coordinates in the V direction.",
"type": "float",
"defaultValue": 0.0,
"min": -1.0,
"max": 1.0
},
{
"name": "rotateDegrees",
"displayName": "Rotate",
"description": "Rotates the texture coordinates (degrees).",
"type": "float",
"defaultValue": 0.0,
"min": -180.0,
"max": 180.0,
"step": 1.0
},
{
"name": "scale",
"displayName": "Scale",
"description": "Scales texture coordinates in both U and V.",
"type": "float",
"defaultValue": 1.0,
"step": 0.1
}
],
"functors": [
{
// Maps 2D scale, offset, and rotate properties into a float3x3 transform matrix.
"type": "Transform2D",
"args": {
"transformOrder": [ "Rotate", "Translate", "Scale" ],
"centerProperty": "center",
"scaleProperty": "scale",
"scaleXProperty": "tileU",
"scaleYProperty": "tileV",
"translateXProperty": "offsetU",
"translateYProperty": "offsetV",
"rotateDegreesProperty": "rotateDegrees",
"float3x3ShaderInput": "m_uvMatrix",
"float3x3InverseShaderInput": "m_uvMatrixInverse"
}
}
]
}