- Floor maps were made a more appropriate size, and gameplay timing adjusted.
- Markers now become entirely vertical when dropped by non-VR players. - Created more music loops.
This commit is contained in:
parent
1f92803fc6
commit
44b78fb8b8
@ -132,6 +132,7 @@
|
||||
<None Include="Assets\TextMesh Pro\Shaders\TMP_Bitmap-Mobile.shader" />
|
||||
<None Include="Assets\TextMesh Pro\Fonts\LiberationSans - OFL.txt" />
|
||||
<None Include="Assets\Shaders\FrontfaceCulling.shader" />
|
||||
<None Include="Assets\Shaders\SDF Map Marker Spokes.shader" />
|
||||
<None Include="Assets\TextMesh Pro\Shaders\TMP_SDF-Mobile.shader" />
|
||||
<None Include="Assets\TextMesh Pro\Shaders\TMP_Sprite.shader" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -37,6 +37,7 @@ AudioMixerGroupController:
|
||||
m_Send: 00000000000000000000000000000000
|
||||
m_Effects:
|
||||
- {fileID: 24400004}
|
||||
- {fileID: 6746766103872582399}
|
||||
m_UserColorIndex: 0
|
||||
m_Mute: 0
|
||||
m_Solo: 0
|
||||
@ -74,5 +75,48 @@ AudioMixerSnapshotController:
|
||||
0e41224d8c9e7f24986a7ca8141bb105: 400
|
||||
b36febcd2a768a04fbea3a42be8278df: 0.773
|
||||
1a52ac4ecb6b25e4a902488e80374143: 4000
|
||||
2fd16b8e7f2624140b7f4983d9ec4339: 1
|
||||
5c59578fcc9f8294aad7ef85c6768a7f: 1.095
|
||||
m_TransitionOverrides: {}
|
||||
--- !u!244 &6746766103872582399
|
||||
AudioMixerEffectController:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_EffectID: 66e82580df11d8147a093944d46d30c2
|
||||
m_EffectName: SFX Reverb
|
||||
m_MixLevel: ff762687bc6f072408683510b59a86d4
|
||||
m_Parameters:
|
||||
- m_ParameterName: Dry Level
|
||||
m_GUID: 80c64030457284541bd595db88194200
|
||||
- m_ParameterName: Room
|
||||
m_GUID: 2bfd79bcf60bb9a459e5eecf4e01f382
|
||||
- m_ParameterName: Room HF
|
||||
m_GUID: 0a82ede26526ff847b94e3b7c8ad098d
|
||||
- m_ParameterName: Decay Time
|
||||
m_GUID: fac1ce552eff91a42a070e987b4c85a0
|
||||
- m_ParameterName: Decay HF Ratio
|
||||
m_GUID: acc74553df2a321459bd3ed8157c1d0f
|
||||
- m_ParameterName: Reflections
|
||||
m_GUID: e9741a9dba530874eb32a2a000d59fdd
|
||||
- m_ParameterName: Reflect Delay
|
||||
m_GUID: cdeea27a4adaa724abe6168be458c79b
|
||||
- m_ParameterName: Reverb
|
||||
m_GUID: e92917bda55cfb64b9d762e551960d84
|
||||
- m_ParameterName: Reverb Delay
|
||||
m_GUID: 9f58c3a987027e640a2188d5d9b911dd
|
||||
- m_ParameterName: Diffusion
|
||||
m_GUID: c634aa6e3b8e73549b11c97e08be4df6
|
||||
- m_ParameterName: Density
|
||||
m_GUID: 12dbf743f7e15814189624c1bfe5e15c
|
||||
- m_ParameterName: HF Reference
|
||||
m_GUID: 56541df46a35a864fb44d0c92020237c
|
||||
- m_ParameterName: Room LF
|
||||
m_GUID: 5063c581d52d21843b7038efd7e595fb
|
||||
- m_ParameterName: LF Reference
|
||||
m_GUID: 0cc2bae937efdb041b293dfc1eb0e585
|
||||
m_SendTarget: {fileID: 0}
|
||||
m_EnableWetMix: 0
|
||||
m_Bypass: 0
|
||||
|
||||
BIN
Assets/Audio/Music/Chase Carmen Loop.wav
Normal file
BIN
Assets/Audio/Music/Chase Carmen Loop.wav
Normal file
Binary file not shown.
41
Assets/Audio/Music/Chase Carmen Loop.wav.meta
Normal file
41
Assets/Audio/Music/Chase Carmen Loop.wav.meta
Normal file
@ -0,0 +1,41 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f74dca797856b746941aedb98365725
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 7
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 0.7
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
platformSettingOverrides:
|
||||
4:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 0.25
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
7:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 0.25
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
forceToMono: 1
|
||||
normalize: 1
|
||||
loadInBackground: 1
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -0,0 +1,41 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 735d407f6f6c4d148b2cda8249c605a9
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 7
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 0.7
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
platformSettingOverrides:
|
||||
4:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 0.25
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
7:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 0.25
|
||||
conversionMode: 0
|
||||
preloadAudioData: 1
|
||||
forceToMono: 1
|
||||
normalize: 1
|
||||
loadInBackground: 1
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -46,7 +46,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: e21db298689c4f84abe7200bc9c130da, type: 3}
|
||||
m_Texture: {fileID: 10300, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
|
||||
95
Assets/Materials/Maps/M_Marker_Spokes_SDF.mat
Normal file
95
Assets/Materials/Maps/M_Marker_Spokes_SDF.mat
Normal file
@ -0,0 +1,95 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: M_Marker_Spokes_SDF
|
||||
m_Shader: {fileID: 4800000, guid: ee8714d3a4c72874697299893a31f79a, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
- _ENABLE_GEOMETRIC_SPECULAR_AA
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 0
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ColourTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: f9769dd687fc7b541ac23b1f56c618bb, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Bicubic: 0
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _EnableGeometricSpecularAA: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 1
|
||||
- _GlossyReflections: 1
|
||||
- _LightmapType: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SDFCutoff: 1
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularAAScreenSpaceVariance: 0.1
|
||||
- _SpecularAAThreshold: 0.2
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
8
Assets/Materials/Maps/M_Marker_Spokes_SDF.mat.meta
Normal file
8
Assets/Materials/Maps/M_Marker_Spokes_SDF.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc22c7f9de95cab4488b30fe8699a82a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
37
Assets/Materials/Paint/M_BluePaint.mat
Normal file
37
Assets/Materials/Paint/M_BluePaint.mat
Normal file
@ -0,0 +1,37 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: M_BluePaint
|
||||
m_Shader: {fileID: 4800000, guid: 0b7113dea2069fc4e8943843eff19f70, type: 3}
|
||||
m_Parent: {fileID: 2100000, guid: d2d3c935fbbe74940915482a36f77687, type: 2}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ENABLE_GEOMETRIC_SPECULAR_AA
|
||||
m_InvalidKeywords:
|
||||
- _NORMALMAP
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 0.33333334
|
||||
m_Colors:
|
||||
- _Color: {r: 0, g: 0.4509804, b: 0.78431374, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
8
Assets/Materials/Paint/M_BluePaint.mat.meta
Normal file
8
Assets/Materials/Paint/M_BluePaint.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af0c1cbaaffed304ba0e3a1fbac41e7e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -43,11 +43,11 @@ Material:
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 50, y: 50}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 50, y: 50}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
|
||||
@ -9,14 +9,14 @@ Material:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: M_BluePaper
|
||||
m_Shader: {fileID: 4800000, guid: 0b7113dea2069fc4e8943843eff19f70, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_Parent: {fileID: 2100000, guid: d2d3c935fbbe74940915482a36f77687, type: 2}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ENABLE_GEOMETRIC_SPECULAR_AA
|
||||
m_InvalidKeywords:
|
||||
- _NORMALMAP
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
@ -24,67 +24,9 @@ Material:
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 2800000, guid: 511a2a95e47da9a4fb1b0b8146ad3e70, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Bicubic: 0
|
||||
- _BumpScale: 0.225
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _EnableGeometricSpecularAA: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 1
|
||||
- _LightmapType: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularAAScreenSpaceVariance: 0.1
|
||||
- _SpecularAAThreshold: 0.2
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Floats: []
|
||||
m_Colors:
|
||||
- _Color: {r: 0, g: 0.4509804, b: 0.78431374, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -85,6 +85,6 @@ Material:
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 0.78431374, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -69,7 +69,7 @@ Material:
|
||||
- _DstBlend: 0
|
||||
- _EnableGeometricSpecularAA: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0
|
||||
- _Glossiness: 1
|
||||
- _GlossyReflections: 1
|
||||
- _LightmapType: 0
|
||||
- _Metallic: 0
|
||||
|
||||
89
Assets/Materials/Plastic/M_RedPlastic.mat
Normal file
89
Assets/Materials/Plastic/M_RedPlastic.mat
Normal file
@ -0,0 +1,89 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: M_RedPlastic
|
||||
m_Shader: {fileID: 4800000, guid: 0b7113dea2069fc4e8943843eff19f70, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ENABLE_GEOMETRIC_SPECULAR_AA
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Bicubic: 0
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _EnableGeometricSpecularAA: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 1
|
||||
- _GlossyReflections: 1
|
||||
- _LightmapType: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularAAScreenSpaceVariance: 0.1
|
||||
- _SpecularAAThreshold: 0.2
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.78431374, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
8
Assets/Materials/Plastic/M_RedPlastic.mat.meta
Normal file
8
Assets/Materials/Plastic/M_RedPlastic.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 621aa4fd25a57834ebac1538c1684549
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
89
Assets/Materials/Plastic/M_WhitePlastic.mat
Normal file
89
Assets/Materials/Plastic/M_WhitePlastic.mat
Normal file
@ -0,0 +1,89 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: M_WhitePlastic
|
||||
m_Shader: {fileID: 4800000, guid: 0b7113dea2069fc4e8943843eff19f70, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ENABLE_GEOMETRIC_SPECULAR_AA
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Bicubic: 0
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _EnableGeometricSpecularAA: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 1
|
||||
- _GlossyReflections: 1
|
||||
- _LightmapType: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularAAScreenSpaceVariance: 0.1
|
||||
- _SpecularAAThreshold: 0.2
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
8
Assets/Materials/Plastic/M_WhitePlastic.mat.meta
Normal file
8
Assets/Materials/Plastic/M_WhitePlastic.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe872fb72ad98da4dbb868481468e848
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,7 +3,22 @@ guid: 02b4b8ced7ec91947943a7a393611db0
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
externalObjects:
|
||||
- first:
|
||||
type: UnityEngine:Material
|
||||
assembly: UnityEngine.CoreModule
|
||||
name: Plastic
|
||||
second: {fileID: 2100000, guid: fe872fb72ad98da4dbb868481468e848, type: 2}
|
||||
- first:
|
||||
type: UnityEngine:Material
|
||||
assembly: UnityEngine.CoreModule
|
||||
name: Pole
|
||||
second: {fileID: 2100000, guid: af0c1cbaaffed304ba0e3a1fbac41e7e, type: 2}
|
||||
- first:
|
||||
type: UnityEngine:Material
|
||||
assembly: UnityEngine.CoreModule
|
||||
name: Spokes
|
||||
second: {fileID: 2100000, guid: cc22c7f9de95cab4488b30fe8699a82a, type: 2}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
@ -37,7 +52,7 @@ ModelImporter:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
addColliders: 1
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
@ -78,7 +93,7 @@ ModelImporter:
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
importAnimation: 0
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
@ -97,7 +112,7 @@ ModelImporter:
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
774
Assets/Shaders/SDF Map Marker Spokes.shader
Normal file
774
Assets/Shaders/SDF Map Marker Spokes.shader
Normal file
@ -0,0 +1,774 @@
|
||||
Shader "Carmen/Maps/SDF Map Marker Spokes"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex("Albedo(RGB)", 2D) = "white" {}
|
||||
_Color("Color", Color) = (1,1,1,1)
|
||||
_SDFCutoff("SDF Cutoff", Range(0.0, 1.0)) = 1.0
|
||||
|
||||
[NoScaleOffset] _MetallicGlossMap("Metallic(R) Smoothness(A) Map", 2D) = "white" {}
|
||||
[Gamma] _Metallic("Metallic", Range(0.0, 1.0)) = 1.0
|
||||
_Glossiness("Smoothness", Range(0.0, 1.0)) = 1.0
|
||||
|
||||
_BumpScale("Scale", Float) = 1.0
|
||||
[NoScaleOffset] _BumpMap("Normal Map", 2D) = "bump" {}
|
||||
|
||||
[NoScaleOffset] _OcclusionMap("Occlusion(G)", 2D) = "white" {}
|
||||
_OcclusionStrength("Strength", Range(0.0, 1.0)) = 1.0
|
||||
|
||||
[NoScaleOffset] _EmissionMap("Emission(RGB)", 2D) = "white" {}
|
||||
_EmissionColor("Emission Color", Color) = (0, 0, 0)
|
||||
|
||||
[Enum(UV0,0,UV1,1)] _UVSec ("UV Set for secondary textures", Float) = 0
|
||||
[NoScaleOffset] _DetailMask("Detail Mask(A)", 2D) = "white" {}
|
||||
|
||||
_DetailAlbedoMap("Detail Albedo x2(RGB)", 2D) = "grey" {}
|
||||
_DetailNormalMapScale("Scale", Float) = 1.0
|
||||
[NoScaleOffset] _DetailNormalMap("Detail Normal Map", 2D) = "bump" {}
|
||||
|
||||
[ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 0
|
||||
[ToggleOff] _GlossyReflections("Glossy Reflections", Float) = 0
|
||||
|
||||
[Toggle(_ENABLE_GEOMETRIC_SPECULAR_AA)] _EnableGeometricSpecularAA("EnableGeometricSpecularAA", Float) = 1.0
|
||||
_SpecularAAScreenSpaceVariance("SpecularAAScreenSpaceVariance", Range(0.0, 1.0)) = 0.1
|
||||
_SpecularAAThreshold("SpecularAAThreshold", Range(0.0, 1.0)) = 0.2
|
||||
|
||||
[Enum(Default,0,MonoSH,1,MonoSH (no highlights),2)] _LightmapType ("Lightmap Type", Float) = 0
|
||||
|
||||
// TODO: This has questionable performance impact on Mobile but very little discernable impact on PC. Should
|
||||
// make a toggle once we have properly branched compilation between those platforms, that's PC-only
|
||||
[Toggle(_BICUBIC)] _Bicubic ("Enable Bicubic Sampling", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
|
||||
CGPROGRAM
|
||||
|
||||
//#define _DEBUG_VRC
|
||||
#ifdef _DEBUG_VRC
|
||||
#define DEBUG_COL(rgb) debugCol = half4(rgb, 1)
|
||||
#define DEBUG_VAL(val) debugCol = half4(val, val, val, 1)
|
||||
half4 debugCol = half4(0,0,0,1);
|
||||
#else
|
||||
#define DEBUG_COL(rgb)
|
||||
#define DEBUG_VAL(val)
|
||||
#endif
|
||||
|
||||
#pragma target 3.0
|
||||
#pragma multi_compile_fragment _ _EMISSION
|
||||
#pragma multi_compile _ _DETAIL
|
||||
#pragma multi_compile_fragment _ _SPECULARHIGHLIGHTS_OFF
|
||||
#pragma multi_compile_fragment _ _GLOSSYREFLECTIONS_OFF
|
||||
#pragma multi_compile_fragment _ _MONOSH_SPECULAR _MONOSH_NOSPECULAR
|
||||
#pragma multi_compile_fragment _ _ENABLE_GEOMETRIC_SPECULAR_AA
|
||||
#pragma dynamic_branch_local_fragment _ DISABLE_VERTEX_COLORING
|
||||
//SDK-SYNC-IGNORE-LINE - unused variants in SDK projects - #pragma multi_compile_fragment _ FORCE_UNITY_DLDR_LIGHTMAP_ENCODING FORCE_UNITY_RGBM_LIGHTMAP_ENCODING FORCE_UNITY_LIGHTMAP_FULL_HDR_ENCODING UNITY_LIGHTMAP_NONE
|
||||
//#pragma multi_compile _ _BICUBIC
|
||||
|
||||
#if defined(LIGHTMAP_ON)
|
||||
#if defined(_MONOSH_SPECULAR) || defined(_MONOSH_NOSPECULAR)
|
||||
#define _MONOSH
|
||||
#if defined(_MONOSH_SPECULAR)
|
||||
#define _LMSPEC
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef VRCHAT_INCLUDED
|
||||
#define VRCHAT_INCLUDED
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityPBSLighting.cginc"
|
||||
|
||||
#if defined(UNITY_SHOULD_SAMPLE_SH) || defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON)
|
||||
#define UNITY_LIGHT_FUNCTION_APPLY_INDIRECT
|
||||
#endif
|
||||
|
||||
#if defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(UNITY_COMPILER_HLSLCC) || defined(SHADER_API_PSSL) || (defined(SHADER_TARGET_SURFACE_ANALYSIS) && !defined(SHADER_TARGET_SURFACE_ANALYSIS_MOJOSHADER))
|
||||
#define SAMPLE_TEXTURE2D(tex,samplertex,coord) tex.Sample (samplertex,coord)
|
||||
#define SAMPLE_TEXTURE2D_GRAD(tex,samplertex,coord,ddx,ddy) tex.SampleGrad(samplertex, coord, ddx, ddy)
|
||||
#define TEXTURE2D_PARAM(textureName, samplerName) Texture2D textureName, SamplerState samplerName
|
||||
#define TEXTURE2D_ARGS(textureName, samplerName) textureName, samplerName
|
||||
#else
|
||||
#define SAMPLE_TEXTURE2D(tex,samplertex,coord) tex2D (tex,coord)
|
||||
#define SAMPLE_TEXTURE2D_GRAD(tex,samplertex,coord,ddx,ddy) tex2Dgrad(tex, coord, ddx, ddy)
|
||||
#define TEXTURE2D_PARAM(textureName, samplerName) sampler2D textureName
|
||||
#define TEXTURE2D_ARGS(textureName, samplerName) textureName
|
||||
#endif
|
||||
|
||||
// Use our squeezed BRDF on mobile
|
||||
// In general we want FLOAT_MIN to be the smallest value such that (1.0f + FLOAT_MIN) != FLOAT_MIN
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
#define VRC_BRDF_PBS BRDF2_VRC_PBS
|
||||
#define FLOAT_MIN 1e-4
|
||||
#else
|
||||
#define VRC_BRDF_PBS UNITY_BRDF_PBS
|
||||
#define FLOAT_MIN 1e-6
|
||||
#endif
|
||||
|
||||
#if defined(_BICUBIC)
|
||||
float BakeryBicubic_w0(float a)
|
||||
{
|
||||
return (1.0f/6.0f)*(a*(a*(-a + 3.0f) - 3.0f) + 1.0f);
|
||||
}
|
||||
|
||||
float BakeryBicubic_w1(float a)
|
||||
{
|
||||
return (1.0f/6.0f)*(a*a*(3.0f*a - 6.0f) + 4.0f);
|
||||
}
|
||||
|
||||
float BakeryBicubic_w2(float a)
|
||||
{
|
||||
return (1.0f/6.0f)*(a*(a*(-3.0f*a + 3.0f) + 3.0f) + 1.0f);
|
||||
}
|
||||
|
||||
float BakeryBicubic_w3(float a)
|
||||
{
|
||||
return (1.0f/6.0f)*(a*a*a);
|
||||
}
|
||||
|
||||
float BakeryBicubic_g0(float a)
|
||||
{
|
||||
return BakeryBicubic_w0(a) + BakeryBicubic_w1(a);
|
||||
}
|
||||
|
||||
float BakeryBicubic_g1(float a)
|
||||
{
|
||||
return BakeryBicubic_w2(a) + BakeryBicubic_w3(a);
|
||||
}
|
||||
|
||||
float BakeryBicubic_h0(float a)
|
||||
{
|
||||
return -1.0f + BakeryBicubic_w1(a) / (BakeryBicubic_w0(a) + BakeryBicubic_w1(a)) + 0.5f;
|
||||
}
|
||||
|
||||
float BakeryBicubic_h1(float a)
|
||||
{
|
||||
return 1.0f + BakeryBicubic_w3(a) / (BakeryBicubic_w2(a) + BakeryBicubic_w3(a)) + 0.5f;
|
||||
}
|
||||
|
||||
// Bicubic
|
||||
float4 SampleTexture2DBicubicFilter(TEXTURE2D_PARAM(tex, smp), float2 coord)
|
||||
{
|
||||
#if defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(UNITY_COMPILER_HLSLCC) || defined(SHADER_API_PSSL) || (defined(SHADER_TARGET_SURFACE_ANALYSIS) && !defined(SHADER_TARGET_SURFACE_ANALYSIS_MOJOSHADER))
|
||||
float width, height;
|
||||
tex.GetDimensions(width, height);
|
||||
float4 texelSize = float4(width, height, 1/width, 1/height);
|
||||
#else
|
||||
float2 theSize = textureSize(tex, 0);
|
||||
float4 texelSize = float4(
|
||||
float(theSize.x),
|
||||
float(theSize.y),
|
||||
1/float(theSize.x),
|
||||
1/float(theSize.y));;
|
||||
#endif
|
||||
|
||||
float x = coord.x * texelSize.z;
|
||||
float y = coord.y * texelSize.z;
|
||||
|
||||
x -= 0.5f;
|
||||
y -= 0.5f;
|
||||
|
||||
float px = floor(x);
|
||||
float py = floor(y);
|
||||
|
||||
float fx = x - px;
|
||||
float fy = y - py;
|
||||
|
||||
float g0x = BakeryBicubic_g0(fx);
|
||||
float g1x = BakeryBicubic_g1(fx);
|
||||
float h0x = BakeryBicubic_h0(fx);
|
||||
float h1x = BakeryBicubic_h1(fx);
|
||||
float h0y = BakeryBicubic_h0(fy);
|
||||
float h1y = BakeryBicubic_h1(fy);
|
||||
|
||||
return BakeryBicubic_g0(fy) * ( g0x * SAMPLE_TEXTURE2D(tex, smp, (float2(px + h0x, py + h0y) * texelSize.x)) +
|
||||
g1x * SAMPLE_TEXTURE2D(tex, smp, (float2(px + h1x, py + h0y) * texelSize.x))) +
|
||||
BakeryBicubic_g1(fy) * ( g0x * SAMPLE_TEXTURE2D(tex, smp, (float2(px + h0x, py + h1y) * texelSize.x)) +
|
||||
g1x * SAMPLE_TEXTURE2D(tex, smp, (float2(px + h1x, py + h1y) * texelSize.x)));
|
||||
}
|
||||
#define MAYBE_BICUBIC_SAMPLE(texture, smp, uv) SampleTexture2DBicubicFilter(TEXTURE2D_ARGS(texture, smp), uv)
|
||||
#else
|
||||
#define MAYBE_BICUBIC_SAMPLE(texture, smp, uv) SAMPLE_TEXTURE2D(texture, smp, uv)
|
||||
#endif
|
||||
|
||||
inline half3 VRC_SafeNormalize(half3 value)
|
||||
{
|
||||
float lenSqr = max((float)dot(value, value), FLOAT_MIN);
|
||||
return value * (half) rsqrt(lenSqr);
|
||||
}
|
||||
|
||||
inline half shEvaluateDiffuseL1Geomerics(half L0, half3 L1, half3 n)
|
||||
{
|
||||
// avg direction of incoming light
|
||||
half3 R1 = 0.5f * L1;
|
||||
|
||||
// directional brightness
|
||||
half lenR1 = length(R1);
|
||||
|
||||
// linear angle between normal and direction 0-1, saturate fix from filamented
|
||||
half q = dot(VRC_SafeNormalize(R1), n) * 0.5 + 0.5;
|
||||
q = isnan(q) ? 1 : q;
|
||||
q = saturate(q);
|
||||
|
||||
// power for q
|
||||
// lerps from 1 (linear) to 3 (cubic) based on directionality
|
||||
//half p = 1.0f + 2.0f * lenR1 / L0;
|
||||
|
||||
// dynamic range constant
|
||||
// should vary between 4 (highly directional) and 0 (ambient)
|
||||
//half a = (1.0f - lenR1 / L0) / (1.0f + lenR1 / L0);
|
||||
|
||||
// negative ambient fix, if L0 <= 0, return 0
|
||||
//return (L0 <= 0.f) ? 0.f : (L0 * (a + (1.0f - a) * (p + 1.0f) * pow(q, p)));
|
||||
|
||||
// optimized reordering. thanks wolfram
|
||||
return (L0 <= 0.f) ? 0.f : ( 4. * lenR1 * pow(q, (2 * lenR1) / L0 + 1) + ( L0 * (L0 - lenR1) )/(L0 + lenR1));
|
||||
}
|
||||
|
||||
inline half shEvaluateDiffuseL1Normalized(half L0, half3 L1, half3 n)
|
||||
{
|
||||
return shEvaluateDiffuseL1Geomerics(1, L1 / L0, n);
|
||||
}
|
||||
|
||||
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA)
|
||||
float PerceptualSmoothnessToRoughness(float perceptualSmoothness)
|
||||
{
|
||||
float perceptualRoughness = SmoothnessToPerceptualRoughness(perceptualSmoothness);
|
||||
half roughness = PerceptualRoughnessToRoughness(perceptualRoughness);
|
||||
return roughness;
|
||||
}
|
||||
|
||||
float RoughnessToPerceptualSmoothness(float roughness)
|
||||
{
|
||||
float perceptualRoughness = RoughnessToPerceptualRoughness(roughness);
|
||||
return 1.0 - perceptualRoughness;
|
||||
}
|
||||
|
||||
float ProjectedSpaceNormalFiltering(half perceptualSmoothness, float variance, float threshold)
|
||||
{
|
||||
float roughness = PerceptualSmoothnessToRoughness(perceptualSmoothness);
|
||||
// Ref: Stable Geometric Specular Antialiasing with Projected-Space NDF Filtering - https://yusuketokuyoshi.com/papers/2021/Tokuyoshi2021SAA.pdf
|
||||
float squaredRoughness = roughness * roughness;
|
||||
float projRoughness2 = squaredRoughness / (1.0 - squaredRoughness);
|
||||
float filteredProjRoughness2 = saturate(projRoughness2 + min(2.0 * variance, threshold * threshold));
|
||||
squaredRoughness = filteredProjRoughness2 / (filteredProjRoughness2 + 1.0f);
|
||||
|
||||
return RoughnessToPerceptualSmoothness(sqrt(squaredRoughness));
|
||||
}
|
||||
|
||||
// Reference: Error Reduction and Simplification for Shading Anti-Aliasing
|
||||
// Specular antialiasing for geometry-induced normal (and NDF) variations: Tokuyoshi / Kaplanyan et al.'s method.
|
||||
// This is the deferred approximation, which works reasonably well so we keep it for forward too for now.
|
||||
// screenSpaceVariance should be at most 0.5^2 = 0.25, as that corresponds to considering
|
||||
// a gaussian pixel reconstruction kernel with a standard deviation of 0.5 of a pixel, thus 2 sigma covering the whole pixel.
|
||||
float GeometricNormalVariance(float3 geometricNormalWS, float screenSpaceVariance)
|
||||
{
|
||||
float3 deltaU = ddx(geometricNormalWS);
|
||||
float3 deltaV = ddy(geometricNormalWS);
|
||||
|
||||
return screenSpaceVariance * (dot(deltaU, deltaU) + dot(deltaV, deltaV));
|
||||
}
|
||||
|
||||
float ProjectedSpaceGeometricNormalFiltering(float perceptualSmoothness, float3 geometricNormalWS, float screenSpaceVariance, float threshold)
|
||||
{
|
||||
float variance = GeometricNormalVariance(geometricNormalWS, screenSpaceVariance);
|
||||
return ProjectedSpaceNormalFiltering(perceptualSmoothness, variance, threshold);
|
||||
}
|
||||
#endif
|
||||
|
||||
//#define OLD_GGX_TERM
|
||||
#if !defined (OLD_GGX_TERM)
|
||||
inline half ComputeSpecularGGX(half3 nL1, half3 viewDir, half3 normalWorld, half smoothness)
|
||||
{
|
||||
nL1 = VRC_SafeNormalize(nL1);
|
||||
|
||||
half3 halfDir = VRC_SafeNormalize(nL1 - viewDir);
|
||||
half nh = saturate(dot(normalWorld, halfDir));
|
||||
|
||||
half perceptualRoughness = SmoothnessToPerceptualRoughness(smoothness);//* sqrt(focus));
|
||||
half roughness = PerceptualRoughnessToRoughness(perceptualRoughness);
|
||||
|
||||
half lh = saturate(dot(nL1, halfDir));
|
||||
// ------------------------
|
||||
// Specular term
|
||||
// GGX Distribution multiplied by combined approximation of Visibility and Fresnel
|
||||
// See "Optimizing PBR for Mobile" from Siggraph 2015 moving mobile graphics course
|
||||
// https://community.arm.com/events/1155
|
||||
|
||||
half a = roughness;
|
||||
half a2 = a*a;
|
||||
|
||||
half d = nh * nh * (a2 - 1.f) + 1.00001f;
|
||||
half specularTerm = a2 / (max(0.1f, lh*lh) * (a + 0.5f) * (d * d) * 4);
|
||||
|
||||
#if defined (SHADER_API_MOBILE)
|
||||
// on mobiles (where half actually means something) denominator have risk of overflow
|
||||
// clamp below was added specifically to "fix" that, but dx compiler (we convert bytecode to metal/gles)
|
||||
// sees that specularTerm have only non-negative terms, so it skips max(0,..) in clamp (leaving only min(100,...))
|
||||
specularTerm = specularTerm - FLOAT_MIN;
|
||||
specularTerm = clamp(specularTerm, 0.0, 100.0); // Prevent FP16 overflow on mobiles
|
||||
#endif
|
||||
|
||||
return specularTerm;
|
||||
}
|
||||
#else
|
||||
inline half ComputeSpecularGGX(half3 nL1, half3 viewDir, half3 normalWorld, half smoothness)
|
||||
{
|
||||
nL1 = VRC_SafeNormalize(nL1);
|
||||
half3 halfDir = VRC_SafeNormalize(nL1 - viewDir);
|
||||
half nh = saturate(dot(normalWorld, halfDir));
|
||||
half perceptualRoughness = SmoothnessToPerceptualRoughness(smoothness );//* sqrt(focus));
|
||||
half roughness = PerceptualRoughnessToRoughness(perceptualRoughness);
|
||||
return GGXTerm(nh, roughness);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_MONOSH)
|
||||
// MonoSH by Bakery Lightmapper https://assetstore.unity.com/packages/tools/level-design/bakery-gpu-lightmapper-122218
|
||||
inline void BakeryMonoSH(out half3 diffuseColor, out half3 specularContrib, float2 lmUV, half3 normalWorld, half3 viewDir, half smoothness, half occlusion)
|
||||
{
|
||||
half3 dominantDir = MAYBE_BICUBIC_SAMPLE(unity_LightmapInd, samplerunity_Lightmap, lmUV).xyz;;
|
||||
half3 L0 = DecodeLightmap(MAYBE_BICUBIC_SAMPLE(unity_Lightmap, samplerunity_Lightmap, lmUV));
|
||||
|
||||
half3 nL1 = dominantDir * 2 - 1;
|
||||
half3x3 L1 = half3x3(nL1.x * L0, nL1.y * L0, nL1.z * L0) * 2;
|
||||
|
||||
half lumaL0 = dot(L0, 1);
|
||||
half3 lumaL1 = mul(L1, half3(1, 1, 1));
|
||||
half lumaSH = shEvaluateDiffuseL1Geomerics(lumaL0, lumaL1, normalWorld);
|
||||
|
||||
half3 sh = L0 + mul(normalWorld, L1);
|
||||
half regularLumaSH = dot(sh, 1);
|
||||
sh *= lerp(1, lumaSH / regularLumaSH, saturate(regularLumaSH*16));
|
||||
|
||||
diffuseColor = max(sh, 0.0);
|
||||
|
||||
#if defined(_LMSPEC)
|
||||
half L1len = length(mul(L1, half3(1, 1, 1)));
|
||||
half focus = L1len / (length(L0) + L1len);
|
||||
half specularTerm = ComputeSpecularGGX(nL1, viewDir, normalWorld, smoothness * focus);
|
||||
|
||||
sh = L0 + mul(nL1, L1);
|
||||
|
||||
specularContrib = max(specularTerm * sh, 0.0);
|
||||
|
||||
// Reflection Probes use occlusion, direct lights don't. MonoSH and Specular Hack are both somewhere in between,
|
||||
// so we use focus to split the difference - 1.0 is direct, 0.0 is reflection probe, so we invert.
|
||||
specularContrib *= LerpOneTo(occlusion, 1 - focus);
|
||||
#else
|
||||
specularContrib = 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
inline UnityGI UnityGI_BaseVRC(UnityGIInput data, half occlusion, half3 normalWorld, half3 eyeVec, half smoothness, half hasReflProbe)
|
||||
{
|
||||
UnityGI o_gi;
|
||||
|
||||
// Base pass with Lightmap support is responsible for handling ShadowMask / blending here for performance reason
|
||||
#if defined(HANDLE_SHADOWS_BLENDING_IN_GI)
|
||||
half bakedAtten = UnitySampleBakedOcclusion(data.lightmapUV.xy, data.worldPos);
|
||||
float zDist = dot(_WorldSpaceCameraPos - data.worldPos, UNITY_MATRIX_V[2].xyz);
|
||||
float fadeDist = UnityComputeShadowFadeDistance(data.worldPos, zDist);
|
||||
data.atten = UnityMixRealtimeAndBakedShadows(data.atten, bakedAtten, UnityComputeShadowFade(fadeDist));
|
||||
#endif
|
||||
|
||||
o_gi.light = data.light;
|
||||
o_gi.light.color *= data.atten;
|
||||
|
||||
#if defined(LIGHTMAP_ON)
|
||||
#if defined(_MONOSH)
|
||||
BakeryMonoSH(o_gi.indirect.diffuse, o_gi.indirect.specular, data.lightmapUV.xy, normalWorld, eyeVec, smoothness, occlusion);
|
||||
#else
|
||||
// Baked lightmaps
|
||||
|
||||
half3 bakedColor = half3(1.0, 1.0, 1.0);
|
||||
half4 bakedColorTex = UNITY_SAMPLE_TEX2D(unity_Lightmap, data.lightmapUV.xy);
|
||||
#if defined(FORCE_UNITY_DLDR_LIGHTMAP_ENCODING)
|
||||
bakedColor = DecodeLightmapDoubleLDR(bakedColorTex, unity_Lightmap_HDR);
|
||||
#elif defined(FORCE_UNITY_RGBM_LIGHTMAP_ENCODING)
|
||||
bakedColor = DecodeLightmapRGBM(bakedColorTex, unity_Lightmap_HDR);
|
||||
#elif defined(FORCE_UNITY_LIGHTMAP_FULL_HDR_ENCODING)
|
||||
bakedColor = bakedColorTex;
|
||||
#else
|
||||
bakedColor = DecodeLightmap(bakedColorTex);
|
||||
#endif
|
||||
|
||||
// Can be set if the renderer has a valid lightmap but the shader doesn't use it
|
||||
#if !defined(UNITY_LIGHTMAP_NONE)
|
||||
#if defined(DIRLIGHTMAP_COMBINED)
|
||||
fixed4 bakedDirTex = UNITY_SAMPLE_TEX2D_SAMPLER(unity_LightmapInd, unity_Lightmap, data.lightmapUV.xy);
|
||||
o_gi.indirect.diffuse = DecodeDirectionalLightmap(bakedColor, bakedDirTex, normalWorld);
|
||||
#else // not directional lightmap
|
||||
o_gi.indirect.diffuse = bakedColor;
|
||||
#endif
|
||||
#else
|
||||
o_gi.indirect.diffuse = 1;
|
||||
#endif
|
||||
|
||||
o_gi.indirect.specular = 0;
|
||||
#endif
|
||||
o_gi.indirect.diffuse *= occlusion;
|
||||
#elif defined(UNITY_SHOULD_SAMPLE_SH)
|
||||
o_gi.indirect.diffuse.r = shEvaluateDiffuseL1Geomerics(unity_SHAr.w, unity_SHAr.xyz, normalWorld);
|
||||
o_gi.indirect.diffuse.g = shEvaluateDiffuseL1Geomerics(unity_SHAg.w, unity_SHAg.xyz, normalWorld);
|
||||
o_gi.indirect.diffuse.b = shEvaluateDiffuseL1Geomerics(unity_SHAb.w, unity_SHAb.xyz, normalWorld);
|
||||
|
||||
#if !defined(_SPECULARHIGHLIGHTS_OFF)
|
||||
UNITY_BRANCH
|
||||
#if !defined(_GLOSSYREFLECTIONS_OFF)
|
||||
if(!any(o_gi.light.color) && !hasReflProbe)
|
||||
#else
|
||||
if(!any(o_gi.light.color))
|
||||
#endif
|
||||
{
|
||||
half3 L0rgb = half3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w);
|
||||
half3x3 L1rgb = half3x3(unity_SHAr.x, unity_SHAg.x, unity_SHAb.x,
|
||||
unity_SHAr.y, unity_SHAg.y, unity_SHAb.y,
|
||||
unity_SHAr.z, unity_SHAg.z, unity_SHAb.z);
|
||||
half3 L1 = unity_SHAr.xyz + unity_SHAg.xyz + unity_SHAb.xyz;
|
||||
|
||||
half3 dominantDir = VRC_SafeNormalize(L1);
|
||||
|
||||
// Light can be anywhere from 'fully sparse' to 'completely focused' based on how much of it is L0 or L1rgb.
|
||||
half L1len = length(L1);
|
||||
half focus = L1len / (length(L0rgb) + L1len);
|
||||
half specularTerm = ComputeSpecularGGX(dominantDir, eyeVec, normalWorld, smoothness * focus);
|
||||
|
||||
// L0 + L1, the total light energy expected, is the same over the whole mesh. This is a problem with specular highlights
|
||||
// as they have a second peak in the negative direction - normally hidden by the fact that light energy there is normally zero.
|
||||
// Multiplying by non-linear diffuse gives satisfactory results, though isn't particularly physically accurate.
|
||||
// The brightness vs ground truth (a reflection probe) is too low though... closest we can get appears to be
|
||||
// a dimensionless version, shEvaluateDiffuseL1Geometrics but applied to just the ratio.
|
||||
half energyFactor = shEvaluateDiffuseL1Normalized(dot(L0rgb, 1), L1, normalWorld);
|
||||
half3 sh = (L0rgb + mul(dominantDir, L1rgb)) * energyFactor;
|
||||
|
||||
o_gi.indirect.specular = max(specularTerm * sh, 0.0);
|
||||
|
||||
// Reflection Probes use occlusion, direct lights don't. MonoSH and Specular Hack are both somewhere in between,
|
||||
// so we use focus to split the difference - 1.0 is direct, 0.0 is reflection probe, so we invert.
|
||||
o_gi.indirect.specular *= LerpOneTo(occlusion, 1 - focus);
|
||||
}
|
||||
else
|
||||
{
|
||||
o_gi.indirect.specular = 0;
|
||||
}
|
||||
#else
|
||||
o_gi.indirect.specular = 0;
|
||||
#endif
|
||||
o_gi.indirect.diffuse += data.ambient;
|
||||
o_gi.indirect.diffuse *= occlusion;
|
||||
#else
|
||||
o_gi.indirect.specular = 0;
|
||||
o_gi.indirect.diffuse = 0;
|
||||
#endif
|
||||
|
||||
return o_gi;
|
||||
}
|
||||
|
||||
struct SurfaceOutputStandardVRC
|
||||
{
|
||||
fixed3 Albedo; // base (diffuse or specular) color
|
||||
float3 Normal; // tangent space normal, if written
|
||||
half3 Emission;
|
||||
half Metallic; // 0=non-metal, 1=metal
|
||||
// Smoothness is the user facing name, it should be perceptual smoothness but user should not have to deal with it.
|
||||
// Everywhere in the code you meet smoothness it is perceptual smoothness
|
||||
half Smoothness; // 0=rough, 1=smooth
|
||||
half Occlusion;
|
||||
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA)
|
||||
half SpecularAAVariance;
|
||||
half SpecularAAThreshold;
|
||||
#endif
|
||||
fixed Alpha; // alpha for transparencies
|
||||
half MinimumBrightness; // minimum brightness regardless of lighting
|
||||
};
|
||||
|
||||
struct SurfaceOutputVRC
|
||||
{
|
||||
fixed3 Albedo;
|
||||
fixed3 Normal;
|
||||
fixed3 Emission;
|
||||
half Specular;
|
||||
fixed Gloss;
|
||||
fixed Alpha;
|
||||
};
|
||||
|
||||
// Based on BRDF2_Unity_PBS
|
||||
// Modified here to re-use calculations for MonoSH and squeeze out all use cases not covered by VRC
|
||||
half4 BRDF2_VRC_PBS (half3 diffColor, half3 specColor, half oneMinusReflectivity, half smoothness,
|
||||
float3 normal, float3 viewDir,
|
||||
UnityLight light, UnityIndirect gi)
|
||||
{
|
||||
half3 color = gi.diffuse * diffColor;
|
||||
#if !defined(_SPECULARHIGHLIGHTS_OFF) || !defined(_GLOSSYREFLECTIONS_OFF)
|
||||
half nv = saturate(dot(normal, viewDir));
|
||||
half grazingTerm = saturate(smoothness + (1-oneMinusReflectivity));
|
||||
// surfaceReduction = Int D(NdotH) * NdotH * Id(NdotL>0) dH = 1/(realRoughness^2+1)
|
||||
half perceptualRoughness = SmoothnessToPerceptualRoughness(smoothness );//* sqrt(focus));
|
||||
half roughness = PerceptualRoughnessToRoughness(perceptualRoughness);
|
||||
|
||||
// 1-0.28*x^3 as approximation for (1/(x^4+1))^(1/2.2) on the domain [0;1]
|
||||
// 1-x^3*(0.6-0.08*x) approximation for 1/(x^4+1)
|
||||
half surfaceReduction = (0.6-0.08*perceptualRoughness);
|
||||
|
||||
surfaceReduction = 1.0 - roughness*perceptualRoughness*surfaceReduction;
|
||||
|
||||
color += surfaceReduction * gi.specular * FresnelLerpFast (specColor, grazingTerm, nv);
|
||||
#endif
|
||||
|
||||
// The DIRECTIONAL static branch exists, but in practice it seems like unity never switches back to the non-DIRECTIONAL variant once it switches
|
||||
// Not worth branching for a single dotproduct, i.e. if no specularity
|
||||
#if !defined(_SPECULARHIGHLIGHTS_OFF)
|
||||
UNITY_BRANCH
|
||||
if(any(light.color))
|
||||
#else
|
||||
if (true)
|
||||
#endif
|
||||
{
|
||||
half nl = saturate(dot(normal, light.dir));
|
||||
half3 mergedContrib = diffColor * nl;
|
||||
#if !defined(_SPECULARHIGHLIGHTS_OFF)
|
||||
half specularTerm = ComputeSpecularGGX(light.dir, -viewDir, normal, smoothness);
|
||||
mergedContrib += max(specularTerm * specColor, 0.0);
|
||||
#endif
|
||||
|
||||
color += light.color * mergedContrib;
|
||||
}
|
||||
// Original BRDF's color function.
|
||||
// Interestingly, it doesn't appear as though fresnel is applied to specular highlights caused by lights?
|
||||
// half3 color = (diffColor + specularTerm * specColor) * light.color * nl
|
||||
// + gi.diffuse * diffColor
|
||||
// + surfaceReduction * gi.specular * FresnelLerpFast (specColor, grazingTerm, nv);
|
||||
|
||||
return half4(color, 1);
|
||||
}
|
||||
|
||||
// executed second
|
||||
inline half4 LightingStandardVRC(SurfaceOutputStandardVRC s, float3 viewDir, UnityGI gi)
|
||||
{
|
||||
s.Normal = normalize(s.Normal);
|
||||
#if defined(_ENABLE_GEOMETRIC_SPECULAR_AA)
|
||||
s.Smoothness = ProjectedSpaceGeometricNormalFiltering(s.Smoothness, s.Normal, s.SpecularAAVariance, s.SpecularAAThreshold);
|
||||
#endif
|
||||
half3 specularColor;
|
||||
half oneMinusReflectivity;
|
||||
s.Albedo = DiffuseAndSpecularFromMetallic(s.Albedo, s.Metallic, /*out*/ specularColor, /*out*/ oneMinusReflectivity);
|
||||
|
||||
// shader relies on pre-multiply alpha-blend (_SrcBlend = One, _DstBlend = OneMinusSrcAlpha)
|
||||
// this is necessary to handle transparency in physically correct way - only diffuse component gets affected by alpha
|
||||
half outputAlpha;
|
||||
s.Albedo = PreMultiplyAlpha (s.Albedo, s.Alpha, oneMinusReflectivity, /*out*/ outputAlpha);
|
||||
|
||||
half4 c = VRC_BRDF_PBS(s.Albedo, specularColor, oneMinusReflectivity, s.Smoothness, s.Normal, viewDir, gi.light, gi.indirect);
|
||||
c.a = outputAlpha;
|
||||
|
||||
#ifndef _DEBUG_VRC
|
||||
return c;
|
||||
#else
|
||||
return debugCol;
|
||||
#endif
|
||||
}
|
||||
|
||||
half3 VRC_GlossyEnvironment (UNITY_ARGS_TEXCUBE(tex), half4 hdr, Unity_GlossyEnvironmentData glossIn, out half hasReflProbe)
|
||||
{
|
||||
half perceptualRoughness = glossIn.roughness /* perceptualRoughness */ ;
|
||||
|
||||
// TODO: CAUTION: remap from Morten may work only with offline convolution, see impact with runtime convolution!
|
||||
// For now disabled
|
||||
#if 0
|
||||
float m = PerceptualRoughnessToRoughness(perceptualRoughness); // m is the real roughness parameter
|
||||
const float fEps = 1.192092896e-07F; // smallest such that 1.0+FLT_EPSILON != 1.0 (+1e-4h is NOT good here. is visibly very wrong)
|
||||
float n = (2.0/max(fEps, m*m))-2.0; // remap to spec power. See eq. 21 in --> https://dl.dropboxusercontent.com/u/55891920/papers/mm_brdf.pdf
|
||||
|
||||
n /= 4; // remap from n_dot_h formulatino to n_dot_r. See section "Pre-convolved Cube Maps vs Path Tracers" --> https://s3.amazonaws.com/docs.knaldtech.com/knald/1.0.0/lys_power_drops.html
|
||||
|
||||
perceptualRoughness = pow( 2/(n+2), 0.25); // remap back to square root of real roughness (0.25 include both the sqrt root of the conversion and sqrt for going from roughness to perceptualRoughness)
|
||||
#else
|
||||
// MM: came up with a surprisingly close approximation to what the #if 0'ed out code above does.
|
||||
perceptualRoughness = perceptualRoughness*(1.7 - 0.7*perceptualRoughness);
|
||||
#endif
|
||||
|
||||
half mip = perceptualRoughnessToMipmapLevel(perceptualRoughness);
|
||||
half3 R = glossIn.reflUVW;
|
||||
half4 rgbm = UNITY_SAMPLE_TEXCUBE_LOD(tex, R, mip);
|
||||
hasReflProbe = rgbm.a;
|
||||
|
||||
return DecodeHDR(rgbm, hdr);
|
||||
}
|
||||
|
||||
inline half3 UnityGI_IndirectSpecularVRC(UnityGIInput data, half occlusion, Unity_GlossyEnvironmentData glossIn, out half hasReflProbe)
|
||||
{
|
||||
half3 specular;
|
||||
|
||||
#if defined(_GLOSSYREFLECTIONS_OFF)
|
||||
specular = unity_IndirectSpecColor.rgb;
|
||||
hasReflProbe = 0;
|
||||
#else
|
||||
#if defined(UNITY_SPECCUBE_BOX_PROJECTION)
|
||||
// we will tweak reflUVW in glossIn directly (as we pass it to Unity_GlossyEnvironment twice for probe0 and probe1), so keep original to pass into BoxProjectedCubemapDirection
|
||||
half3 originalReflUVW = glossIn.reflUVW;
|
||||
glossIn.reflUVW = BoxProjectedCubemapDirection (originalReflUVW, data.worldPos, data.probePosition[0], data.boxMin[0], data.boxMax[0]);
|
||||
#endif
|
||||
|
||||
half3 env0 = VRC_GlossyEnvironment (UNITY_PASS_TEXCUBE(unity_SpecCube0), data.probeHDR[0], glossIn, hasReflProbe);
|
||||
#if defined(UNITY_SPECCUBE_BLENDING)
|
||||
const float kBlendFactor = 0.99999;
|
||||
float blendLerp = data.boxMin[0].w;
|
||||
UNITY_BRANCH
|
||||
if (blendLerp < kBlendFactor)
|
||||
{
|
||||
half secondReflProbe = 0;
|
||||
half3 env1 = VRC_GlossyEnvironment (UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1,unity_SpecCube0), data.probeHDR[1], glossIn, secondReflProbe);
|
||||
hasReflProbe += secondReflProbe;
|
||||
specular = lerp(env1, env0, blendLerp);
|
||||
}
|
||||
else
|
||||
{
|
||||
specular = env0;
|
||||
}
|
||||
#else
|
||||
specular = env0;
|
||||
#endif
|
||||
#endif
|
||||
return specular * occlusion;
|
||||
}
|
||||
|
||||
inline void VRC_ApplyMinBrightness(inout UnityGI gi, half minBright)
|
||||
{
|
||||
gi.indirect.diffuse = max(gi.indirect.diffuse, minBright);
|
||||
}
|
||||
|
||||
// executed first
|
||||
inline void LightingStandardVRC_GI(SurfaceOutputStandardVRC s, UnityGIInput data, inout UnityGI gi)
|
||||
{
|
||||
Unity_GlossyEnvironmentData g = UnityGlossyEnvironmentSetup(s.Smoothness, data.worldViewDir, s.Normal, lerp(unity_ColorSpaceDielectricSpec.rgb, s.Albedo, s.Metallic));
|
||||
half hasReflProbe = 0;
|
||||
half3 indirectSpecular = UnityGI_IndirectSpecularVRC(data, s.Occlusion, g, /* out */ hasReflProbe);
|
||||
gi = UnityGI_BaseVRC(data, s.Occlusion, s.Normal, -data.worldViewDir, s.Smoothness, hasReflProbe);
|
||||
VRC_ApplyMinBrightness(gi, s.MinimumBrightness);
|
||||
gi.indirect.specular += indirectSpecular;
|
||||
}
|
||||
|
||||
inline fixed4 UnityLambertVRCLight (SurfaceOutputVRC s, UnityLight light)
|
||||
{
|
||||
fixed diff = max (0, dot (s.Normal, light.dir));
|
||||
|
||||
fixed4 c;
|
||||
c.rgb = s.Albedo * light.color * diff;
|
||||
c.a = s.Alpha;
|
||||
return c;
|
||||
}
|
||||
|
||||
inline fixed4 LightingLambertVRC (SurfaceOutputVRC s, UnityGI gi)
|
||||
{
|
||||
fixed4 c;
|
||||
c = UnityLambertVRCLight (s, gi.light);
|
||||
|
||||
#if defined(UNITY_LIGHT_FUNCTION_APPLY_INDIRECT)
|
||||
c.rgb += s.Albedo * gi.indirect.diffuse;
|
||||
#endif
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
inline void LightingLambertVRC_GI (
|
||||
SurfaceOutputVRC s,
|
||||
UnityGIInput data,
|
||||
inout UnityGI gi)
|
||||
{
|
||||
gi = UnityGI_BaseVRC(data, 1.0, s.Normal, half3(0, 0, 0), half(0), 0);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#pragma surface surf StandardVRC vertex:vert exclude_path:prepass exclude_path:deferred noforwardadd noshadow nodynlightmap nolppv noshadowmask
|
||||
#pragma skip_variants LIGHTMAP_SHADOW_MIXING
|
||||
|
||||
// -------------------------------------
|
||||
|
||||
struct Input
|
||||
{
|
||||
float2 texcoord0;
|
||||
#ifdef _DETAIL
|
||||
float2 texcoord1;
|
||||
#endif
|
||||
fixed4 color : COLOR;
|
||||
};
|
||||
|
||||
UNITY_DECLARE_TEX2D(_MainTex);
|
||||
float4 _MainTex_ST;
|
||||
half4 _Color;
|
||||
uniform half _SDFCutoff;
|
||||
|
||||
UNITY_DECLARE_TEX2D(_MetallicGlossMap);
|
||||
uniform half _Glossiness;
|
||||
uniform half _Metallic;
|
||||
|
||||
UNITY_DECLARE_TEX2D(_BumpMap);
|
||||
uniform half _BumpScale;
|
||||
|
||||
UNITY_DECLARE_TEX2D(_OcclusionMap);
|
||||
uniform half _OcclusionStrength;
|
||||
|
||||
uniform half _SpecularAAScreenSpaceVariance;
|
||||
uniform half _SpecularAAThreshold;
|
||||
|
||||
#ifdef _EMISSION
|
||||
UNITY_DECLARE_TEX2D(_EmissionMap);
|
||||
half4 _EmissionColor;
|
||||
#endif
|
||||
|
||||
#ifdef _DETAIL
|
||||
uniform half _UVSec;
|
||||
float4 _DetailAlbedoMap_ST;
|
||||
UNITY_DECLARE_TEX2D(_DetailMask);
|
||||
UNITY_DECLARE_TEX2D(_DetailAlbedoMap);
|
||||
UNITY_DECLARE_TEX2D(_DetailNormalMap);
|
||||
uniform half _DetailNormalMapScale;
|
||||
#endif
|
||||
|
||||
// Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader.
|
||||
// See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing.
|
||||
// #pragma instancing_options assumeuniformscaling
|
||||
UNITY_INSTANCING_BUFFER_START(Props)
|
||||
// put more per-instance properties here
|
||||
UNITY_INSTANCING_BUFFER_END(Props)
|
||||
|
||||
// -------------------------------------
|
||||
void vert(inout appdata_full v, out Input o)
|
||||
{
|
||||
UNITY_INITIALIZE_OUTPUT(Input,o);
|
||||
o.texcoord0 = TRANSFORM_TEX(v.texcoord.xy, _MainTex); // Always source from uv0
|
||||
#ifdef _DETAIL
|
||||
o.texcoord1 = TRANSFORM_TEX(((_UVSec == 0) ? v.texcoord.xy : v.texcoord1.xy), _DetailAlbedoMap);
|
||||
#endif
|
||||
}
|
||||
|
||||
void surf(Input IN, inout SurfaceOutputStandardVRC o)
|
||||
{
|
||||
half alphastep = step(UNITY_SAMPLE_TEX2D(_MainTex, IN.texcoord0), 0.0020f);
|
||||
if (alphastep < 0.5f) discard;
|
||||
o.Albedo = _Color;
|
||||
o.Alpha = alphastep;
|
||||
|
||||
o.Metallic = 0.0f;
|
||||
o.Smoothness = _Glossiness;
|
||||
o.Normal = half3(0, 0, 1);
|
||||
|
||||
#ifdef _EMISSION
|
||||
o.Emission = UNITY_SAMPLE_TEX2D(_EmissionMap, IN.texcoord0) * _EmissionColor;
|
||||
#endif
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
FallBack "VRChat/Mobile/Diffuse"
|
||||
CustomEditor "StandardLiteShaderGUI"
|
||||
}
|
||||
9
Assets/Shaders/SDF Map Marker Spokes.shader.meta
Normal file
9
Assets/Shaders/SDF Map Marker Spokes.shader.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee8714d3a4c72874697299893a31f79a
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
BIN
Assets/Textures/Maps/T_Marker_Spokes_SDF.png
Normal file
BIN
Assets/Textures/Maps/T_Marker_Spokes_SDF.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
140
Assets/Textures/Maps/T_Marker_Spokes_SDF.png.meta
Normal file
140
Assets/Textures/Maps/T_Marker_Spokes_SDF.png.meta
Normal file
@ -0,0 +1,140 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9769dd687fc7b541ac23b1f56c618bb
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 1
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 0
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 10
|
||||
textureShape: 1
|
||||
singleChannelComponent: 1
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 128
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 9
|
||||
textureCompression: 3
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: iPhone
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 9
|
||||
textureCompression: 1
|
||||
compressionQuality: 0
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 64
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 9
|
||||
textureCompression: 1
|
||||
compressionQuality: 0
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 1
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@ -9,9 +9,18 @@ using VRC.Udon;
|
||||
public enum MusicEventType
|
||||
{
|
||||
None,
|
||||
|
||||
CarmenSandiegoTheme,
|
||||
CarmenSandiegoWindDown,
|
||||
|
||||
TheChase,
|
||||
ThinkAboutIt,
|
||||
|
||||
RecoverTheLoot,
|
||||
|
||||
IFeelGood,
|
||||
CarmenChaseMusic,
|
||||
|
||||
WhereInTheWorld,
|
||||
RockapellaIdent
|
||||
}
|
||||
@ -38,9 +47,17 @@ public class AudioManager : UdonSharpBehaviour
|
||||
[SerializeField] private AudioSource _SFXPlayer = null;
|
||||
|
||||
[Header("Music")]
|
||||
[SerializeField] private AudioClip _CarmenSandiegoTheme = null;
|
||||
[SerializeField] private AudioClip _CarmenSandiegoWindDown = null;
|
||||
|
||||
[SerializeField] private AudioClip _TheChase = null;
|
||||
[SerializeField] private AudioClip _ThinkAboutIt = null;
|
||||
|
||||
[SerializeField] private AudioClip _RecoverTheLoot = null;
|
||||
|
||||
[SerializeField] private AudioClip _IFeelGood = null;
|
||||
[SerializeField] private AudioClip _CarmenChaseMusic = null;
|
||||
|
||||
[SerializeField] private AudioClip _WhereInTheWorld = null;
|
||||
[SerializeField] private AudioClip _RockapellaIdent = null;
|
||||
|
||||
@ -92,9 +109,17 @@ public class AudioManager : UdonSharpBehaviour
|
||||
|
||||
switch (MusicEvent)
|
||||
{
|
||||
case MusicEventType.CarmenSandiegoTheme: _MusicPlayer.clip = _CarmenSandiegoTheme; break;
|
||||
case MusicEventType.CarmenSandiegoWindDown: _MusicPlayer.clip = _CarmenSandiegoWindDown; break;
|
||||
|
||||
case MusicEventType.TheChase: _MusicPlayer.clip = _TheChase; break;
|
||||
case MusicEventType.ThinkAboutIt: _MusicPlayer.clip = _ThinkAboutIt; break;
|
||||
|
||||
case MusicEventType.RecoverTheLoot: _MusicPlayer.clip = _RecoverTheLoot; break;
|
||||
|
||||
case MusicEventType.IFeelGood: _MusicPlayer.clip = _IFeelGood; break;
|
||||
case MusicEventType.CarmenChaseMusic: _MusicPlayer.clip = _CarmenChaseMusic; break;
|
||||
|
||||
case MusicEventType.WhereInTheWorld: _MusicPlayer.clip = _WhereInTheWorld; break;
|
||||
case MusicEventType.RockapellaIdent: _MusicPlayer.clip = _RockapellaIdent; break;
|
||||
default: _MusicPlayer.clip = null; break;
|
||||
|
||||
@ -92,7 +92,7 @@ public class CaseManager : UdonSharpBehaviour
|
||||
ErrorString = "Ensure the 'Round 3' dictionary entry is a dictionary with a key called 'Continent' and an integer value.";
|
||||
}
|
||||
|
||||
ContinueToRound3();
|
||||
ContinueToRound1();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -67,6 +67,8 @@ public class GameManagerRound2 : GameManagerBase
|
||||
(HostCardRecoverTheLootExplainerInterface)GetHostCardInterface(RoundSegmentType.RecoverTheLootExplainer);
|
||||
|
||||
RecoverTheLootInterface.HeaderUI.text = RoundSegmentTypeToString(RoundSegmentType.RecoverTheLootExplainer);
|
||||
|
||||
EnableInteraction("Begin Round");
|
||||
}
|
||||
|
||||
private void PopulateLandmarkDataOnLocationBoard()
|
||||
@ -191,6 +193,8 @@ public class GameManagerRound2 : GameManagerBase
|
||||
|
||||
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)_AudioManager, NetworkEventTarget.All,
|
||||
"StopMusic");
|
||||
|
||||
EnableInteraction("Continue with the game in whatever way ends up being necessary when this is implemented");
|
||||
}
|
||||
|
||||
|
||||
@ -246,11 +250,14 @@ public class GameManagerRound2 : GameManagerBase
|
||||
|
||||
protected override void _HostCardUseButtonDown_Internal()
|
||||
{
|
||||
DisableInteraction();
|
||||
|
||||
_StageIndex++;
|
||||
switch(_StageIndex)
|
||||
{
|
||||
case 1: DisplayBriefing(); break;
|
||||
case 2: BeginRound(); break;
|
||||
case 3: _CaseManager.ContinueToRound3(); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 12
|
||||
Data: 13
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@ -578,10 +578,64 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _Timer
|
||||
Data: _GameStatus
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _GameStatus
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 37|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: GameStatus, Assembly-CSharp
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 29
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 38|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _Timer
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Timer
|
||||
@ -605,7 +659,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 37|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@ -629,7 +683,7 @@ MonoBehaviour:
|
||||
Data: _SuccessCounter
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 41|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _SuccessCounter
|
||||
@ -653,7 +707,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 39|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 42|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@ -677,7 +731,7 @@ MonoBehaviour:
|
||||
Data: _FailureCounter
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 40|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _FailureCounter
|
||||
@ -701,7 +755,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 44|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
|
||||
@ -15,6 +15,15 @@ public enum ContinentMap
|
||||
SouthAmerica
|
||||
}
|
||||
|
||||
public enum GameStatus
|
||||
{
|
||||
Pregame,
|
||||
Begin,
|
||||
RanOutOfTime,
|
||||
RanOutOfMarkers,
|
||||
Win
|
||||
}
|
||||
|
||||
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class GameManagerRound3 : GameManagerBase
|
||||
@ -30,7 +39,9 @@ public class GameManagerRound3 : GameManagerBase
|
||||
private DataDictionary _ContinentData;
|
||||
private int _StageIndex = 0;
|
||||
|
||||
private GameStatus _GameStatus = GameStatus.Pregame;
|
||||
private int _Timer = TIMER_LENGTH;
|
||||
private const float LENGTH_OF_ONE_SECOND = 1.04444444444444444f;
|
||||
private const int TIMER_LENGTH = 45;
|
||||
|
||||
private int _SuccessCounter = 0;
|
||||
@ -69,7 +80,7 @@ public class GameManagerRound3 : GameManagerBase
|
||||
Debug.LogError("Malformed round data. Ensure Round 3 contains a continent to use for the map.");
|
||||
}
|
||||
|
||||
EnableInteraction("Start Game");
|
||||
EnableInteraction("Display Briefing");
|
||||
}
|
||||
|
||||
private void DisplayBriefing()
|
||||
@ -78,6 +89,8 @@ public class GameManagerRound3 : GameManagerBase
|
||||
(HostCardCaptureCarmenExplainerInterface)GetHostCardInterface(RoundSegmentType.CaptureCarmenExplainer);
|
||||
|
||||
CaptureCarmenExplainerInterface.HeaderUI.text = RoundSegmentTypeToString(RoundSegmentType.CaptureCarmenExplainer);
|
||||
|
||||
EnableInteraction("Begin");
|
||||
}
|
||||
|
||||
|
||||
@ -86,6 +99,29 @@ public class GameManagerRound3 : GameManagerBase
|
||||
UpdateInterface();
|
||||
|
||||
GetCurrentMarker().EnablePickup(true);
|
||||
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
private void StartTimer()
|
||||
{
|
||||
_AudioManager.PlayMusicLoop(MusicEventType.CarmenChaseMusic);
|
||||
|
||||
_GameStatus = GameStatus.Begin;
|
||||
_Timer = TIMER_LENGTH;
|
||||
SendCustomEventDelayedSeconds(nameof(TickTimer), LENGTH_OF_ONE_SECOND);
|
||||
}
|
||||
|
||||
public void TickTimer()
|
||||
{
|
||||
_Timer--;
|
||||
if (_Timer < 0)
|
||||
{
|
||||
GameHasBeenLost();
|
||||
return;
|
||||
}
|
||||
|
||||
SendCustomEventDelayedSeconds(nameof(TickTimer), LENGTH_OF_ONE_SECOND);
|
||||
}
|
||||
|
||||
public void CorrectResponse()
|
||||
@ -94,6 +130,7 @@ public class GameManagerRound3 : GameManagerBase
|
||||
|
||||
GetCurrentMarker().EnablePickup(false);
|
||||
|
||||
_FailureCounter = 0;
|
||||
_SuccessCounter++;
|
||||
if (_SuccessCounter >= MAX_SUCCESS_COUNT)
|
||||
{
|
||||
@ -155,15 +192,43 @@ public class GameManagerRound3 : GameManagerBase
|
||||
|
||||
public void GameHasBeenWon()
|
||||
{
|
||||
if ((int)_GameStatus <= (int)GameStatus.Begin)
|
||||
{
|
||||
GameStatusUpdate(GameStatus.Win);
|
||||
|
||||
HostCardBetweenRoundsInterface GameWinInterface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
GameWinInterface.HeaderUI.text = "The player has won the game. " + _Timer + " seconds to spare.";
|
||||
|
||||
GameWinInterface.HeaderUI.text = "The player has won the game.";
|
||||
_AudioManager.PlayMusicLoop(MusicEventType.CarmenSandiegoWindDown);
|
||||
}
|
||||
}
|
||||
|
||||
public void GameHasBeenLost(bool RanOutOfMarkers = false)
|
||||
{
|
||||
Debug.LogError("Game was lost. Ran out of " + (RanOutOfMarkers ? "markers" : "time") + ".");
|
||||
if ((int)_GameStatus != (int)GameStatus.Win)
|
||||
{
|
||||
for (int i = 0; i < _Markers.Length; i++)
|
||||
{
|
||||
_Markers[i].EnablePickup(false);
|
||||
}
|
||||
|
||||
GameStatusUpdate(RanOutOfMarkers ? GameStatus.RanOutOfMarkers : GameStatus.RanOutOfTime);
|
||||
|
||||
HostCardBetweenRoundsInterface GameLossInterface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
GameLossInterface.HeaderUI.text = "The player has lost. " + _SuccessCounter + " countries in " + TIMER_LENGTH + " seconds.";
|
||||
|
||||
_AudioManager.StopMusic();
|
||||
}
|
||||
}
|
||||
|
||||
private void GameStatusUpdate(GameStatus NewStatus)
|
||||
{
|
||||
if ((int)_GameStatus <= (int)GameStatus.Begin)
|
||||
{
|
||||
_GameStatus = NewStatus;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -195,6 +260,8 @@ public class GameManagerRound3 : GameManagerBase
|
||||
|
||||
protected override void _HostCardUseButtonDown_Internal()
|
||||
{
|
||||
DisableInteraction();
|
||||
|
||||
_StageIndex++;
|
||||
switch (_StageIndex)
|
||||
{
|
||||
|
||||
@ -46,8 +46,6 @@ public class FloorMap : UdonSharpBehaviour
|
||||
_ChosenCountries[i] = Location.Country;
|
||||
_ChosenCities[i] = Location.City;
|
||||
}
|
||||
|
||||
Debug.LogError("Current location: " + _ChosenCities[_CurrentCountry] + ", " + _ChosenCountries[_CurrentCountry]);
|
||||
}
|
||||
|
||||
public int NextCountry()
|
||||
|
||||
@ -3,7 +3,7 @@ using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Components;
|
||||
using VRC.SDK3.Data;
|
||||
using static UnityEditor.FilePathAttribute;
|
||||
using VRC.SDKBase;
|
||||
|
||||
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
@ -60,6 +60,13 @@ public class FloorMapMarker : UdonSharpBehaviour
|
||||
public override void OnDrop()
|
||||
{
|
||||
IsGrabbed = false;
|
||||
|
||||
VRCPlayerApi Owner = Networking.GetOwner(gameObject);
|
||||
if (!Owner.IsUserInVR())
|
||||
{
|
||||
transform.eulerAngles = new Vector3(0.0f, transform.eulerAngles.y, 0.0f);
|
||||
}
|
||||
|
||||
CheckCollisions();
|
||||
|
||||
base.OnDrop();
|
||||
|
||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: BoneFollower
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: ccbda9bf23e2f714c9226283c77a92e5,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 52ecc8a73071e8e40928c3609699fcf4,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: InteractToggle
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 405e38d3dfb2f514daeed0e28fbb4864,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 873dfce61b1514e429c92e0d2fded7de,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: PlayerModSetter
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: f938e6c4ff027a74da405a1f9353fd2b,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: e81558796a212ab4d88e305e2010f24b,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: GlobalToggleObject
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: c49c9265a3ef24642a6a4465d0a78872,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 2fe8ced6184000f49bca526cd2c5891c,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: MasterToggleObject
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 04024a76ab1924042ba521e11cb76d91,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: a2d01d9f36ac6df49831be249e48ecc4,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: TrackingDataFollower
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 17f8fbbe6cc186d4f8dbb057b01a4ec2,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 1b89d4552983c0448a7389decec3b555,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
|
||||
m_Name: WorldAudioSettings
|
||||
m_EditorClassIdentifier:
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 128d924a3066b7546b2d1c73e61006ab,
|
||||
serializedUdonProgramAsset: {fileID: 11400000, guid: 994b559b0f158b4499f8937980ed8694,
|
||||
type: 2}
|
||||
udonAssembly:
|
||||
assemblyError:
|
||||
|
||||
@ -10,8 +10,8 @@ AudioManager:
|
||||
Default Speaker Mode: 2
|
||||
m_SampleRate: 48000
|
||||
m_DSPBufferSize: 1024
|
||||
m_VirtualVoiceCount: 32
|
||||
m_RealVoiceCount: 24
|
||||
m_VirtualVoiceCount: 64
|
||||
m_RealVoiceCount: 32
|
||||
m_EnableOutputSuspension: 1
|
||||
m_SpatializerPlugin: OculusSpatializer
|
||||
m_AmbisonicDecoderPlugin: OculusSpatializer
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user