Skip to content

Commit 0aafda0

Browse files
committed
fix(Pointer): ensure custom pointer objects retain set material
Previously, the custom pointer objects were having their materials overriden by the default pointer material which meant that any custom objects didn't look correct. This fix ensures that only the colour and emission colour on the pointer objects is changed and not the material. The inspector settings for the pointers has also had a bit of a tidy up and headers added to make them easier to understand. The Darken method from the Highlighter has also been moved to a public static method in Utilities so it can be used in multiple places as it now is.
1 parent 0e4c58b commit 0aafda0

File tree

13 files changed

+493
-396
lines changed

13 files changed

+493
-396
lines changed

Assets/VRTK/Examples/Resources/Materials/Simple_Solid_Colors/Blue.mat

Lines changed: 110 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -8,131 +8,120 @@ Material:
88
m_PrefabInternal: {fileID: 0}
99
m_Name: Blue
1010
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
11-
m_ShaderKeywords:
12-
m_LightmapFlags: 5
11+
m_ShaderKeywords: _EMISSION
12+
m_LightmapFlags: 1
1313
m_CustomRenderQueue: -1
1414
stringTagMap: {}
1515
m_SavedProperties:
1616
serializedVersion: 2
1717
m_TexEnvs:
18-
data:
19-
first:
20-
name: _MainTex
21-
second:
22-
m_Texture: {fileID: 0}
23-
m_Scale: {x: 1, y: 1}
24-
m_Offset: {x: 0, y: 0}
25-
data:
26-
first:
27-
name: _BumpMap
28-
second:
29-
m_Texture: {fileID: 0}
30-
m_Scale: {x: 1, y: 1}
31-
m_Offset: {x: 0, y: 0}
32-
data:
33-
first:
34-
name: _DetailNormalMap
35-
second:
36-
m_Texture: {fileID: 0}
37-
m_Scale: {x: 1, y: 1}
38-
m_Offset: {x: 0, y: 0}
39-
data:
40-
first:
41-
name: _MetallicGlossMap
42-
second:
43-
m_Texture: {fileID: 0}
44-
m_Scale: {x: 1, y: 1}
45-
m_Offset: {x: 0, y: 0}
46-
data:
47-
first:
48-
name: _ParallaxMap
49-
second:
50-
m_Texture: {fileID: 0}
51-
m_Scale: {x: 1, y: 1}
52-
m_Offset: {x: 0, y: 0}
53-
data:
54-
first:
55-
name: _OcclusionMap
56-
second:
57-
m_Texture: {fileID: 0}
58-
m_Scale: {x: 1, y: 1}
59-
m_Offset: {x: 0, y: 0}
60-
data:
61-
first:
62-
name: _EmissionMap
63-
second:
64-
m_Texture: {fileID: 0}
65-
m_Scale: {x: 1, y: 1}
66-
m_Offset: {x: 0, y: 0}
67-
data:
68-
first:
69-
name: _DetailMask
70-
second:
71-
m_Texture: {fileID: 0}
72-
m_Scale: {x: 1, y: 1}
73-
m_Offset: {x: 0, y: 0}
74-
data:
75-
first:
76-
name: _DetailAlbedoMap
77-
second:
78-
m_Texture: {fileID: 0}
79-
m_Scale: {x: 1, y: 1}
80-
m_Offset: {x: 0, y: 0}
18+
- first:
19+
name: _BumpMap
20+
second:
21+
m_Texture: {fileID: 0}
22+
m_Scale: {x: 1, y: 1}
23+
m_Offset: {x: 0, y: 0}
24+
- first:
25+
name: _DetailAlbedoMap
26+
second:
27+
m_Texture: {fileID: 0}
28+
m_Scale: {x: 1, y: 1}
29+
m_Offset: {x: 0, y: 0}
30+
- first:
31+
name: _DetailMask
32+
second:
33+
m_Texture: {fileID: 0}
34+
m_Scale: {x: 1, y: 1}
35+
m_Offset: {x: 0, y: 0}
36+
- first:
37+
name: _DetailNormalMap
38+
second:
39+
m_Texture: {fileID: 0}
40+
m_Scale: {x: 1, y: 1}
41+
m_Offset: {x: 0, y: 0}
42+
- first:
43+
name: _EmissionMap
44+
second:
45+
m_Texture: {fileID: 0}
46+
m_Scale: {x: 1, y: 1}
47+
m_Offset: {x: 0, y: 0}
48+
- first:
49+
name: _MainTex
50+
second:
51+
m_Texture: {fileID: 0}
52+
m_Scale: {x: 1, y: 1}
53+
m_Offset: {x: 0, y: 0}
54+
- first:
55+
name: _MetallicGlossMap
56+
second:
57+
m_Texture: {fileID: 0}
58+
m_Scale: {x: 1, y: 1}
59+
m_Offset: {x: 0, y: 0}
60+
- first:
61+
name: _OcclusionMap
62+
second:
63+
m_Texture: {fileID: 0}
64+
m_Scale: {x: 1, y: 1}
65+
m_Offset: {x: 0, y: 0}
66+
- first:
67+
name: _ParallaxMap
68+
second:
69+
m_Texture: {fileID: 0}
70+
m_Scale: {x: 1, y: 1}
71+
m_Offset: {x: 0, y: 0}
8172
m_Floats:
82-
data:
83-
first:
84-
name: _SrcBlend
85-
second: 1
86-
data:
87-
first:
88-
name: _DstBlend
89-
second: 0
90-
data:
91-
first:
92-
name: _Cutoff
93-
second: 0.5
94-
data:
95-
first:
96-
name: _ZWrite
97-
second: 1
98-
data:
99-
first:
100-
name: _Glossiness
101-
second: 0.5
102-
data:
103-
first:
104-
name: _Metallic
105-
second: 0
106-
data:
107-
first:
108-
name: _BumpScale
109-
second: 1
110-
data:
111-
first:
112-
name: _Parallax
113-
second: 0.02
114-
data:
115-
first:
116-
name: _OcclusionStrength
117-
second: 1
118-
data:
119-
first:
120-
name: _DetailNormalMapScale
121-
second: 1
122-
data:
123-
first:
124-
name: _UVSec
125-
second: 0
126-
data:
127-
first:
128-
name: _Mode
129-
second: 0
73+
- first:
74+
name: _BumpScale
75+
second: 1
76+
- first:
77+
name: _Cutoff
78+
second: 0.5
79+
- first:
80+
name: _DetailNormalMapScale
81+
second: 1
82+
- first:
83+
name: _DstBlend
84+
second: 0
85+
- first:
86+
name: _GlossMapScale
87+
second: 1
88+
- first:
89+
name: _Glossiness
90+
second: 0.5
91+
- first:
92+
name: _GlossyReflections
93+
second: 1
94+
- first:
95+
name: _Metallic
96+
second: 0
97+
- first:
98+
name: _Mode
99+
second: 0
100+
- first:
101+
name: _OcclusionStrength
102+
second: 1
103+
- first:
104+
name: _Parallax
105+
second: 0.02
106+
- first:
107+
name: _SmoothnessTextureChannel
108+
second: 0
109+
- first:
110+
name: _SpecularHighlights
111+
second: 1
112+
- first:
113+
name: _SrcBlend
114+
second: 1
115+
- first:
116+
name: _UVSec
117+
second: 0
118+
- first:
119+
name: _ZWrite
120+
second: 1
130121
m_Colors:
131-
data:
132-
first:
133-
name: _EmissionColor
134-
second: {r: 0, g: 0, b: 0, a: 1}
135-
data:
136-
first:
137-
name: _Color
138-
second: {r: 0, g: 0, b: 1, a: 1}
122+
- first:
123+
name: _Color
124+
second: {r: 0, g: 0, b: 1, a: 1}
125+
- first:
126+
name: _EmissionColor
127+
second: {r: 0, g: 0, b: 0, a: 1}
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 6
6+
m_ObjectHideFlags: 0
7+
m_PrefabParentObject: {fileID: 0}
8+
m_PrefabInternal: {fileID: 0}
9+
m_Name: Blue
10+
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
11+
m_ShaderKeywords: _EMISSION
12+
m_LightmapFlags: 1
13+
m_CustomRenderQueue: -1
14+
stringTagMap: {}
15+
m_SavedProperties:
16+
serializedVersion: 2
17+
m_TexEnvs:
18+
- first:
19+
name: _BumpMap
20+
second:
21+
m_Texture: {fileID: 0}
22+
m_Scale: {x: 1, y: 1}
23+
m_Offset: {x: 0, y: 0}
24+
- first:
25+
name: _DetailAlbedoMap
26+
second:
27+
m_Texture: {fileID: 0}
28+
m_Scale: {x: 1, y: 1}
29+
m_Offset: {x: 0, y: 0}
30+
- first:
31+
name: _DetailMask
32+
second:
33+
m_Texture: {fileID: 0}
34+
m_Scale: {x: 1, y: 1}
35+
m_Offset: {x: 0, y: 0}
36+
- first:
37+
name: _DetailNormalMap
38+
second:
39+
m_Texture: {fileID: 0}
40+
m_Scale: {x: 1, y: 1}
41+
m_Offset: {x: 0, y: 0}
42+
- first:
43+
name: _EmissionMap
44+
second:
45+
m_Texture: {fileID: 0}
46+
m_Scale: {x: 1, y: 1}
47+
m_Offset: {x: 0, y: 0}
48+
- first:
49+
name: _MainTex
50+
second:
51+
m_Texture: {fileID: 0}
52+
m_Scale: {x: 1, y: 1}
53+
m_Offset: {x: 0, y: 0}
54+
- first:
55+
name: _MetallicGlossMap
56+
second:
57+
m_Texture: {fileID: 0}
58+
m_Scale: {x: 1, y: 1}
59+
m_Offset: {x: 0, y: 0}
60+
- first:
61+
name: _OcclusionMap
62+
second:
63+
m_Texture: {fileID: 0}
64+
m_Scale: {x: 1, y: 1}
65+
m_Offset: {x: 0, y: 0}
66+
- first:
67+
name: _ParallaxMap
68+
second:
69+
m_Texture: {fileID: 0}
70+
m_Scale: {x: 1, y: 1}
71+
m_Offset: {x: 0, y: 0}
72+
m_Floats:
73+
- first:
74+
name: _BumpScale
75+
second: 1
76+
- first:
77+
name: _Cutoff
78+
second: 0.5
79+
- first:
80+
name: _DetailNormalMapScale
81+
second: 1
82+
- first:
83+
name: _DstBlend
84+
second: 0
85+
- first:
86+
name: _GlossMapScale
87+
second: 1
88+
- first:
89+
name: _Glossiness
90+
second: 0.5
91+
- first:
92+
name: _GlossyReflections
93+
second: 1
94+
- first:
95+
name: _Metallic
96+
second: 0
97+
- first:
98+
name: _Mode
99+
second: 0
100+
- first:
101+
name: _OcclusionStrength
102+
second: 1
103+
- first:
104+
name: _Parallax
105+
second: 0.02
106+
- first:
107+
name: _SmoothnessTextureChannel
108+
second: 0
109+
- first:
110+
name: _SpecularHighlights
111+
second: 1
112+
- first:
113+
name: _SrcBlend
114+
second: 1
115+
- first:
116+
name: _UVSec
117+
second: 0
118+
- first:
119+
name: _ZWrite
120+
second: 1
121+
m_Colors:
122+
- first:
123+
name: _Color
124+
second: {r: 0, g: 0, b: 1, a: 1}
125+
- first:
126+
name: _EmissionColor
127+
second: {r: 0, g: 0, b: 0, a: 1}

Assets/VRTK/Examples/Resources/Materials/Simple_Solid_Colors/Cyan.mat.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)