Skip to content

Commit 7ff4aa1

Browse files
author
Wilhelm Berg
authored
Integrate mapbox-ar-unity (#544)
* add ARCore, ARKit, UnityARInterface * Mapbox AR code and examples * add KalmanFilter * some updated metas * fix .gitignore to not ignore parts of ARCore * add AR prefabs * fix .gitignore for .metas from temp files from docs generation * add additional properties to `Location` * add helper class for onscreen console * [wip] integrate AR * more logging for caching * MBTilesCache: Windows fix for path and filenames with +260 chars * add some logging to AbstractMap.cs * add editorconfig * debug messages around telem lib initialization * ARTableTop: test in Vienna * ProjectSettings: enable AR on Android * remove Debug messages * fix typo in TelemetryAndroid.cs file name * add layers needed for AR demo to the project settings * fix Unity's byte stripping for .Net 4.6 and IL2CPP * throw out uncessary stuff that comes with UnityARInterface and ARCore * update readme, add AR readme. * update CHANGELOG * wip integrate ar * Throw away unused ARKit stuff.
1 parent 72d5498 commit 7ff4aa1

File tree

755 files changed

+61998
-78
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

755 files changed

+61998
-78
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ sdkproject/Assets/WSATestCertificate.pfx.meta
1313
# Documentation
1414
docfx.zip
1515
/docfx
16-
api
16+
#api
1717
_site
1818
src/Documentation/log.txt
19+
obj.meta
1920

2021
# build
2122
.vs/

README-AR.md

+204
Large diffs are not rendered by default.

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Mapbox-unity-sdk
22
### For Unity 2017.1+
33

4+
**AR support requires Unity 2017.3+, Android 7+ (Nougat), iOS 11.3**
5+
6+
Find the [AR specific README here](README-AR.md).
7+
8+
If AR support is not needed these subfolders of `sdkproject/Assets/` maybe deleted:
9+
* MapboxAR
10+
* UnityARInterface
11+
* GoogleARCore
12+
* UnityARKitPlugin
13+
414
(for 5.4x compatible versions, please use [this commit](https://github.com/mapbox/mapbox-unity-sdk/releases/tag/Last-official-Unity5x-support))
515

616
Tools for using Mapbox APIs with C# / Unity. If you'd like to contribute to the project, [read CONTRIBUTING.md](CONTRIBUTING.md).

documentation/docs/05-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#####
77
- Included EditorConfig file to enforce coding style
8+
- Integration of previously seperate AR support https://github.com/mapbox/mapbox-unity-sdk/pull/544
89

910
### v.1.3.0
1011
*12/18/2017*

sdkproject/Assets/GoogleARCore.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdkproject/Assets/GoogleARCore/Configurations.meta

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_PrefabParentObject: {fileID: 0}
7+
m_PrefabInternal: {fileID: 0}
8+
m_GameObject: {fileID: 0}
9+
m_Enabled: 1
10+
m_EditorHideFlags: 0
11+
m_Script: {fileID: 11500000, guid: 53ac32fab2599402fb6d154adf4c1e40, type: 3}
12+
m_Name: DefaultSessionConfig
13+
m_EditorClassIdentifier:
14+
m_matchCameraFramerate: 1
15+
m_enablePlaneFinding: 1
16+
m_enableLightEstimation: 1

sdkproject/Assets/GoogleARCore/Configurations/DefaultSessionConfig.asset.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdkproject/Assets/GoogleARCore/Examples.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdkproject/Assets/GoogleARCore/Examples/ComputerVision.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdkproject/Assets/GoogleARCore/Examples/ComputerVision/Materials.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Shader "AREdgeDetectionBackground"
2+
{
3+
Properties
4+
{
5+
_OverlayPercentage ("Overlay Percentage", Range (0.0, 1.0)) = 0.5
6+
}
7+
8+
// For GLES3
9+
SubShader
10+
{
11+
Pass
12+
{
13+
ZWrite Off
14+
15+
GLSLPROGRAM
16+
17+
#pragma only_renderers gles3
18+
19+
#ifdef SHADER_API_GLES3
20+
#extension GL_OES_EGL_image_external_essl3 : require
21+
#endif
22+
23+
uniform vec4 _UvTopLeftRight;
24+
uniform vec4 _UvBottomLeftRight;
25+
26+
#ifdef VERTEX
27+
28+
#define kPortrait 1.0
29+
#define kPortraitUpsideDown 2.0
30+
#define kLandscapeLeft 3.0
31+
#define kLandscapeRight 4.0
32+
33+
varying vec2 textureCoord;
34+
35+
void main()
36+
{
37+
#ifdef SHADER_API_GLES3
38+
vec2 uvTop = mix(_UvTopLeftRight.xy, _UvTopLeftRight.zw, gl_MultiTexCoord0.x);
39+
vec2 uvBottom = mix(_UvBottomLeftRight.xy, _UvBottomLeftRight.zw, gl_MultiTexCoord0.x);
40+
textureCoord = mix(uvTop, uvBottom, gl_MultiTexCoord0.y);
41+
42+
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
43+
#endif
44+
}
45+
46+
#endif
47+
48+
#ifdef FRAGMENT
49+
varying vec2 textureCoord;
50+
uniform samplerExternalOES _MainTex;
51+
uniform sampler2D _ImageTex;
52+
uniform float _OverlayPercentage;
53+
54+
void main()
55+
{
56+
#ifdef SHADER_API_GLES3
57+
if (textureCoord.x < _OverlayPercentage)
58+
gl_FragColor = texture(_MainTex, textureCoord);
59+
else
60+
{
61+
vec4 color = texture2D(_ImageTex, textureCoord);
62+
gl_FragColor.xyz = color.xxx;
63+
}
64+
#endif
65+
}
66+
67+
#endif
68+
69+
ENDGLSL
70+
}
71+
}
72+
73+
FallBack Off
74+
}

sdkproject/Assets/GoogleARCore/Examples/ComputerVision/Materials/AREdgeDetectionBackground.shader.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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: AREdgeDetectionBackgroundMaterial
10+
m_Shader: {fileID: 4800000, guid: b7004efaaedb14dfcba62eea5c70c9d2, type: 3}
11+
m_ShaderKeywords:
12+
m_LightmapFlags: 4
13+
m_EnableInstancingVariants: 0
14+
m_DoubleSidedGI: 0
15+
m_CustomRenderQueue: -1
16+
stringTagMap: {}
17+
disabledShaderPasses: []
18+
m_SavedProperties:
19+
serializedVersion: 3
20+
m_TexEnvs:
21+
- _BumpMap:
22+
m_Texture: {fileID: 0}
23+
m_Scale: {x: 1, y: 1}
24+
m_Offset: {x: 0, y: 0}
25+
- _DetailAlbedoMap:
26+
m_Texture: {fileID: 0}
27+
m_Scale: {x: 1, y: 1}
28+
m_Offset: {x: 0, y: 0}
29+
- _DetailMask:
30+
m_Texture: {fileID: 0}
31+
m_Scale: {x: 1, y: 1}
32+
m_Offset: {x: 0, y: 0}
33+
- _DetailNormalMap:
34+
m_Texture: {fileID: 0}
35+
m_Scale: {x: 1, y: 1}
36+
m_Offset: {x: 0, y: 0}
37+
- _EmissionMap:
38+
m_Texture: {fileID: 0}
39+
m_Scale: {x: 1, y: 1}
40+
m_Offset: {x: 0, y: 0}
41+
- _MainTex:
42+
m_Texture: {fileID: 0}
43+
m_Scale: {x: 1, y: 1}
44+
m_Offset: {x: 0, y: 0}
45+
- _MetallicGlossMap:
46+
m_Texture: {fileID: 0}
47+
m_Scale: {x: 1, y: 1}
48+
m_Offset: {x: 0, y: 0}
49+
- _OcclusionMap:
50+
m_Texture: {fileID: 0}
51+
m_Scale: {x: 1, y: 1}
52+
m_Offset: {x: 0, y: 0}
53+
- _ParallaxMap:
54+
m_Texture: {fileID: 0}
55+
m_Scale: {x: 1, y: 1}
56+
m_Offset: {x: 0, y: 0}
57+
m_Floats:
58+
- _BumpScale: 1
59+
- _Cutoff: 0.5
60+
- _DetailNormalMapScale: 1
61+
- _DstBlend: 0
62+
- _GlossMapScale: 1
63+
- _Glossiness: 0.5
64+
- _GlossyReflections: 1
65+
- _Metallic: 0
66+
- _Mode: 0
67+
- _OcclusionStrength: 1
68+
- _Parallax: 0.02
69+
- _SmoothnessTextureChannel: 0
70+
- _SpecularHighlights: 1
71+
- _SrcBlend: 1
72+
- _UVSec: 0
73+
- _ZWrite: 1
74+
m_Colors:
75+
- _Color: {r: 1, g: 1, b: 1, a: 1}
76+
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

sdkproject/Assets/GoogleARCore/Examples/ComputerVision/Materials/AREdgeDetectionBackgroundMaterial.mat.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdkproject/Assets/GoogleARCore/Examples/ComputerVision/Plugins.meta

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdkproject/Assets/GoogleARCore/Examples/ComputerVision/Plugins/libarcore_camera_utility.so.meta

+95
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)