-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# This .gitignore file should be placed at the root of your Unity project directory | ||
# | ||
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore | ||
# | ||
/[Ll]ibrary/ | ||
/[Tt]emp/ | ||
/[Oo]bj/ | ||
/[Bb]uild/s | ||
/[Bb]uilds/ | ||
/[Ll]ogs/ | ||
/[Uu]ser[Ss]ettings/ | ||
|
||
# MemoryCaptures can get excessive in size. | ||
# They also could contain extremely sensitive data | ||
/[Mm]emoryCaptures/ | ||
|
||
# Recordings can get excessive in size | ||
/[Rr]ecordings/ | ||
|
||
# Uncomment this line if you wish to ignore the asset store tools plugin | ||
# /[Aa]ssets/AssetStoreTools* | ||
|
||
# Autogenerated Jetbrains Rider plugin | ||
/[Aa]ssets/Plugins/Editor/JetBrains* | ||
|
||
# Visual Studio cache directory | ||
.vs/ | ||
|
||
# Gradle cache directory | ||
.gradle/ | ||
|
||
# Autogenerated VS/MD/Consulo solution and project files | ||
ExportedObj/ | ||
.consulo/ | ||
*.csproj | ||
*.unityproj | ||
*.sln | ||
*.suo | ||
*.tmp | ||
*.user | ||
*.userprefs | ||
*.pidb | ||
*.booproj | ||
*.svd | ||
*.pdb | ||
*.mdb | ||
*.opendb | ||
*.VC.db | ||
|
||
# Unity3D generated meta files | ||
*.pidb.meta | ||
*.pdb.meta | ||
*.mdb.meta | ||
|
||
# Unity3D generated file on crash reports | ||
sysinfo.txt | ||
|
||
# Builds | ||
*.apk | ||
*.aab | ||
*.unitypackage | ||
*.app | ||
|
||
# Crashlytics generated file | ||
crashlytics-build.properties | ||
|
||
# Packed Addressables | ||
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* | ||
|
||
# Temporary auto-generated Android Assets | ||
/[Aa]ssets/[Ss]treamingAssets/aa.meta | ||
/[Aa]ssets/[Ss]treamingAssets/aa/* | ||
|
||
/[Aa]pp |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"files.exclude": | ||
{ | ||
"**/.DS_Store":true, | ||
"**/.git":true, | ||
"**/.gitmodules":true, | ||
"**/*.booproj":true, | ||
"**/*.pidb":true, | ||
"**/*.suo":true, | ||
"**/*.user":true, | ||
"**/*.userprefs":true, | ||
"**/*.unityproj":true, | ||
"**/*.dll":true, | ||
"**/*.exe":true, | ||
"**/*.pdf":true, | ||
"**/*.mid":true, | ||
"**/*.midi":true, | ||
"**/*.wav":true, | ||
"**/*.gif":true, | ||
"**/*.ico":true, | ||
"**/*.jpg":true, | ||
"**/*.jpeg":true, | ||
"**/*.png":true, | ||
"**/*.psd":true, | ||
"**/*.tga":true, | ||
"**/*.tif":true, | ||
"**/*.tiff":true, | ||
"**/*.3ds":true, | ||
"**/*.3DS":true, | ||
"**/*.fbx":true, | ||
"**/*.FBX":true, | ||
"**/*.lxo":true, | ||
"**/*.LXO":true, | ||
"**/*.ma":true, | ||
"**/*.MA":true, | ||
"**/*.obj":true, | ||
"**/*.OBJ":true, | ||
"**/*.asset":true, | ||
"**/*.cubemap":true, | ||
"**/*.flare":true, | ||
"**/*.mat":true, | ||
"**/*.meta":true, | ||
"**/*.prefab":true, | ||
"**/*.unity":true, | ||
"build/":true, | ||
"Build/":true, | ||
"Library/":true, | ||
"library/":true, | ||
"obj/":true, | ||
"Obj/":true, | ||
"ProjectSettings/":true, | ||
"temp/":true, | ||
"Temp/":true | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 45b0089a7785abf4f908eb77852f8a71, type: 3} | ||
m_Name: SpatialAnchorConfig | ||
m_EditorClassIdentifier: | ||
authenticationMode: 0 | ||
spatialAnchorsAccountId: | ||
spatialAnchorsAccountKey: | ||
spatialAnchorsAccountDomain: | ||
clientId: | ||
tenantId: |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
// NOTE: MRTK Shaders are versioned via the MRTK.Shaders.sentinel file. | ||
// When making changes to any shader's source file, the value in the sentinel _must_ be incremented. | ||
|
||
Shader "Hidden/ChannelPacker" | ||
{ | ||
Properties | ||
{ | ||
_MetallicMap("Metallic Map", 2D) = "black" {} | ||
_MetallicMapChannel("Metallic Map Channel", Int) = 0 // Red. | ||
_MetallicUniform("Metallic Uniform", Float) = -0.01 | ||
_OcclusionMap("Occlusion Map", 2D) = "white" {} | ||
_OcclusionMapChannel("Occlusion Map Channel", Int) = 1 // Green. | ||
_OcclusionUniform("Occlusion Uniform", Float) = -0.01 | ||
_EmissionMap("Emission Map", 2D) = "black" {} | ||
_EmissionMapChannel("Emission Map Channel", Int) = 4 // RGBAverage. | ||
_EmissionUniform("Emission Uniform", Float) = -0.01 | ||
_SmoothnessMap("Smoothness Map", 2D) = "gray" {} | ||
_SmoothnessMapChannel("Smoothness Map Channel", Int) = 3 // Alpha. | ||
_SmoothnessUniform("Smoothness Uniform", Float) = -0.01 | ||
} | ||
SubShader | ||
{ | ||
Pass | ||
{ | ||
CGPROGRAM | ||
|
||
#pragma vertex vert | ||
#pragma fragment frag | ||
|
||
#include "UnityCG.cginc" | ||
|
||
struct appdata | ||
{ | ||
float4 vertex : POSITION; | ||
float2 uv : TEXCOORD0; | ||
}; | ||
|
||
struct v2f | ||
{ | ||
float4 vertex : SV_POSITION; | ||
float2 uv : TEXCOORD0; | ||
}; | ||
|
||
sampler2D _MetallicMap; | ||
int _MetallicMapChannel; | ||
float _MetallicUniform; | ||
sampler2D _OcclusionMap; | ||
int _OcclusionMapChannel; | ||
float _OcclusionUniform; | ||
sampler2D _EmissionMap; | ||
int _EmissionMapChannel; | ||
float _EmissionUniform; | ||
sampler2D _SmoothnessMap; | ||
int _SmoothnessMapChannel; | ||
float _SmoothnessUniform; | ||
|
||
v2f vert(appdata v) | ||
{ | ||
v2f o; | ||
o.vertex = UnityObjectToClipPos(v.vertex); | ||
o.uv = v.uv; | ||
|
||
return o; | ||
} | ||
|
||
fixed4 ToGrayScale(fixed4 color) | ||
{ | ||
return color.r * 0.21 + color.g * 0.71 + color.b * 0.08; | ||
} | ||
|
||
fixed Sample(fixed4 color, int channel, float uniformValue) | ||
{ | ||
if (uniformValue >= 0.0) | ||
{ | ||
return uniformValue; | ||
} | ||
|
||
if (channel == 4) | ||
{ | ||
return ToGrayScale(color); | ||
} | ||
|
||
return color[channel]; | ||
} | ||
|
||
fixed4 frag(v2f i) : SV_Target | ||
{ | ||
fixed4 output; | ||
|
||
output.r = Sample(tex2D(_MetallicMap, i.uv), _MetallicMapChannel, _MetallicUniform); | ||
output.g = Sample(tex2D(_OcclusionMap, i.uv), _OcclusionMapChannel, _OcclusionUniform); | ||
output.b = Sample(tex2D(_EmissionMap, i.uv), _EmissionMapChannel, _EmissionUniform); | ||
output.a = Sample(tex2D(_SmoothnessMap, i.uv), _SmoothnessMapChannel, _SmoothnessUniform); | ||
|
||
return output; | ||
} | ||
|
||
ENDCG | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
// NOTE: MRTK Shaders are versioned via the MRTK.Shaders.sentinel file. | ||
// When making changes to any shader's source file, the value in the sentinel _must_ be incremented. | ||
|
||
Shader "Mixed Reality Toolkit/Depth Buffer Viewer" | ||
{ | ||
Properties | ||
{ | ||
_DepthTex("Texture", 2D) = "black" {} | ||
_MainTex("Base (RGB)", 2D) = "green" {} | ||
} | ||
|
||
SubShader | ||
{ | ||
Pass | ||
{ | ||
CGPROGRAM | ||
#pragma vertex vert_img | ||
#pragma fragment frag | ||
|
||
#include "UnityCG.cginc" | ||
|
||
uniform sampler2D _MainTex; | ||
sampler2D _DepthTex; | ||
|
||
float4 frag(v2f_img i) : COLOR | ||
{ | ||
return Linear01Depth(SAMPLE_DEPTH_TEXTURE(_DepthTex, i.uv)); | ||
} | ||
ENDCG | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.