1
0
mirror of synced 2025-02-22 05:19:34 +01:00

Merge pull request #42 from xiaopeng12138/xpeng-dev

merge from dev
This commit is contained in:
xpeng 2022-09-10 18:32:16 +02:00 committed by GitHub
commit 4814157dc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 2256 additions and 395 deletions

View File

@ -17,8 +17,8 @@ LightingSettings:
m_IndirectOutputScale: 1
m_UsingShadowmask: 0
m_BakeBackend: 1
m_LightmapMaxSize: 1024
m_BakeResolution: 40
m_LightmapMaxSize: 2048
m_BakeResolution: 256
m_Padding: 2
m_LightmapCompression: 3
m_AO: 0
@ -27,7 +27,7 @@ LightingSettings:
m_CompAOExponentDirect: 0
m_ExtractAO: 0
m_MixedBakeMode: 1
m_LightmapsBakeMode: 1
m_LightmapsBakeMode: 0
m_FilterMode: 1
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
m_ExportTrainingData: 0
@ -38,24 +38,24 @@ LightingSettings:
m_FinalGather: 0
m_FinalGatherRayCount: 256
m_FinalGatherFiltering: 1
m_PVRCulling: 1
m_PVRCulling: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 256
m_PVREnvironmentSampleCount: 128
m_PVRDirectSampleCount: 2048
m_PVRSampleCount: 1024
m_PVREnvironmentSampleCount: 512
m_PVREnvironmentReferencePointCount: 2048
m_LightProbeSampleCountMultiplier: 4
m_PVRBounces: 2
m_PVRMinBounces: 1
m_PVREnvironmentMIS: 1
m_PVRFilteringMode: 2
m_PVREnvironmentMIS: 0
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 2
m_PVRDenoiserTypeIndirect: 2
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringGaussRadiusDirect: 2
m_PVRFilteringGaussRadiusDirect: 5
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5

View File

@ -7,11 +7,10 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Material.001
m_Shader: {fileID: 4800000, guid: 6661b5a6c9b5f6e45ae07f0fa22876e2, type: 3}
m_Name: Display
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
m_ValidKeywords: []
m_InvalidKeywords:
- _FLIPBOOKBLENDING_OFF
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
@ -46,7 +45,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
@ -81,58 +80,37 @@ Material:
m_Floats:
- _AlphaClip: 0
- _Blend: 0
- _BlendOp: 0
- _BumpScale: 1
- _CameraFadingEnabled: 0
- _CameraFarFadeDistance: 2
- _CameraNearFadeDistance: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _ColorMode: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DistortionBlend: 0.5
- _DistortionEnabled: 0
- _DistortionStrength: 1
- _DistortionStrengthScaled: 0.1
- _DstBlend: 0
- _EnvironmentReflections: 1
- _FlipX: 0
- _FlipY: 0
- _FlipbookBlending: 0
- _FlipbookMode: 0
- _GlossMapScale: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 1
- _GlossyReflections: 0
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SoftParticlesEnabled: 0
- _SoftParticlesFarFadeDistance: 1
- _SoftParticlesNearFadeDistance: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.9063317, g: 0.9063317, b: 0.9063317, a: 1}
- _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
- _CameraFadeParams: {r: 0, g: 0, b: 0, a: 0}
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &155017172321468035
--- !u!114 &3832124457568167228
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c783e0f4a42a5c54a95a2ea55e1b42d1
guid: 9293cbadfcfd55243bd53fc0e7f4ca21
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000

View File

@ -110,8 +110,8 @@ Material:
- _WorkflowMode: 0
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.59117126, g: 0.7169812, b: 0.65470546, a: 1}
- _Color: {r: 0.59117126, g: 0.7169812, b: 0.65470546, a: 1}
- _BaseColor: {r: 0.70164704, g: 0.852, b: 0.7784941, a: 1}
- _Color: {r: 0.70164704, g: 0.852, b: 0.7784941, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@ Material:
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 6
m_EnableInstancingVariants: 0
m_EnableInstancingVariants: 1
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
@ -108,8 +108,8 @@ Material:
- _GlossinessSource: 0
- _GlossyReflections: 1
- _LineCount: 8
- _LineEmitOpasity: 0.2
- _LineHight: 0.01
- _LineEmitOpasity: 0.25
- _LineHight: 0.15
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
@ -126,12 +126,15 @@ Material:
- _SrcBlend: 1
- _Surface: 0
- _UVSec: 0
- _Vignett: 0.5
- _VignettHardness: -0.15
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.4056604, g: 0.4056604, b: 0.4056604, a: 1}
- _BaseColor: {r: 0.12887147, g: 0.18042988, b: 0.18867922, a: 1}
- _Color: {r: 0.34905657, g: 0.34905657, b: 0.34905657, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColor2: {r: 0, g: 0, b: 0, a: 0}
- _LineColor: {r: 0, g: 0, b: 0, a: 0}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -108,8 +108,8 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.37868667, g: 0.5377358, b: 0.35206476, a: 1}
- _Color: {r: 0.37868664, g: 0.53773576, b: 0.35206473, a: 1}
- _BaseColor: {r: 0.43756205, g: 0.618, b: 0.4059854, a: 1}
- _Color: {r: 0.43756202, g: 0.618, b: 0.40598536, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

View File

@ -1,98 +0,0 @@
fileFormatVersion: 2
guid: 13ab8f5585e4c334b85a938b806511b6
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
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
isReadable: 0
streamingMipmaps: 1
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 3
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
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: 12
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -13,6 +13,7 @@ public class CameraSmooth : MonoBehaviour {
}
void Update ()
{
if (target == null) return;
transform.position = Vector3.Lerp(transform.position, target.position + PositionOffset, smoothSpeed);
transform.rotation = Quaternion.Lerp(transform.rotation, target.rotation, smoothSpeed);
}

View File

@ -8,7 +8,8 @@ public class LightManager : MonoBehaviour
{
public List<GameObject> Lights = new List<GameObject>();
List<Material> Materials = new List<Material>();
public static bool useIPC = true;
public static bool useIPC = false;
public static bool useIPC_Config = true;
static Texture2D RGBColor2D;
public static MemoryMappedFile sharedBuffer;
@ -20,14 +21,14 @@ public class LightManager : MonoBehaviour
private void Start()
{
if (JsonConfiguration.HasKey("useIPC"))
useIPC = JsonConfiguration.GetBoolean("useIPC");
useIPC_Config = JsonConfiguration.GetBoolean("useIPC");
else
JsonConfiguration.SetBoolean("useIPC", useIPC);
JsonConfiguration.SetBoolean("useIPC", useIPC_Config);
for (int i = 0; i < Lights.Count; i++)
Materials.Add(Lights[i].GetComponent<Renderer>().material);
if (useIPC)
if (useIPC_Config)
{
InitializeIPC("Local\\WACVR_SHARED_BUFFER", 2164);
RGBColor2D = new Texture2D(480, 1, TextureFormat.RGBA32, false);
@ -37,9 +38,19 @@ public class LightManager : MonoBehaviour
}
private void Update()
{
GetTextureFromBytes(GetBytesFromMemory());
if (useIPC_Config)
CheckIPCState();
if (useIPC)
UpdateLED();
}
private void CheckIPCState()
{
if (RGBColor2D.GetPixel(0 , 0).a == 0)
useIPC = false;
else
useIPC = true;
}
private void InitializeIPC(string sharedMemoryName, int sharedMemorySize)
{
MemoryMappedFileSecurity CustomSecurity = new MemoryMappedFileSecurity();
@ -51,14 +62,15 @@ public class LightManager : MonoBehaviour
}
private void UpdateLED()
{
GetTextureFromBytes(GetBytesFromMemory());
int index = 0;
for (int i = 0; i < 30; i++)
{
for (int ii = 0; ii < 4; ii++)
{
Materials[119 - i - ii * 30].SetColor("_EmissionColor", RGBColor2D.GetPixel(index * 2, 0));
Materials[119 - i - ii * 30].SetColor("_EmissionColor2", RGBColor2D.GetPixel(index * 2 + 1, 0));
Materials[210 + i - ii * 30].SetColor("_EmissionColor", RGBColor2D.GetPixel((index + 120) * 2, 0));
Materials[210 + i - ii * 30].SetColor("_EmissionColor2", RGBColor2D.GetPixel((index + 120) * 2 + 1, 0));
index++;
}
}
@ -83,6 +95,7 @@ public class LightManager : MonoBehaviour
if (State)
{
Materials[Area].SetColor("_EmissionColor", new Color(1f, 1f, 1f, 1f));
Materials[Area].SetColor("_EmissionColor2", new Color(1f, 1f, 1f, 1f));
}
else
{
@ -98,6 +111,7 @@ public class LightManager : MonoBehaviour
{
float p = 1 - time / FadeDuration;
mat.SetColor("_EmissionColor", new Color(p, p, p, 1f));
mat.SetColor("_EmissionColor2", new Color(p, p, p, 1f));
yield return null;
}
}

View File

@ -35,7 +35,7 @@ MonoBehaviour:
features:
- {fileID: 7581227243671795047}
- {fileID: -3687958811547312280}
- {fileID: 6797662432667753210}
- {fileID: 3105951399032240424}
- {fileID: -660904743828199304}
- {fileID: 587458779450762736}
- {fileID: 2332717924642193878}
@ -44,7 +44,7 @@ MonoBehaviour:
- {fileID: 3607529374417723074}
- {fileID: 2518257850819104886}
- {fileID: -9221150314526244616}
m_renderMode: 0
m_renderMode: 1
m_depthSubmissionMode: 0
--- !u!114 &-4197090093912000502
MonoBehaviour:
@ -203,6 +203,26 @@ MonoBehaviour:
required: 0
cacheSize: 1048576
perThreadCacheSize: 51200
--- !u!114 &3105951399032240424
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: c465bd23c9c4fb442ae89117552a5f3f, type: 3}
m_Name: HandTrackingFeature Standalone
m_EditorClassIdentifier:
m_enabled: 0
nameUi: Ultraleap Hand Tracking
version: 1.0.0
featureIdInternal: com.ultraleap.tracking.openxr.feature.handtracking
openxrExtensionStrings: XR_EXT_hand_tracking XR_ULTRALEAP_hand_tracking_forearm
company: Ultraleap
priority: 0
required: 0
--- !u!114 &3607529374417723074
MonoBehaviour:
m_ObjectHideFlags: 0
@ -256,7 +276,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c465bd23c9c4fb442ae89117552a5f3f, type: 3}
m_Name: HandTrackingFeature Standalone
m_EditorClassIdentifier:
m_enabled: 1
m_enabled: 0
nameUi: Ultraleap Hand Tracking
version: 1.0.0
featureIdInternal: com.ultraleap.tracking.openxr.feature.handtracking

View File

@ -1,8 +1,8 @@
{
"dependencies": {
"com.hecomi.uwindowcapture": "https://github.com/hecomi/uWindowCapture.git#upm",
"com.ultraleap.tracking": "5.11.0",
"com.ultraleap.tracking.openxr": "1.0.0-pre.5",
"com.ultraleap.tracking": "5.13.0",
"com.ultraleap.tracking.openxr": "1.0.0-pre.7",
"com.unity.ide.visualstudio": "2.0.16",
"com.unity.ide.vscode": "1.2.5",
"com.unity.nuget.newtonsoft-json": "3.0.2",
@ -12,7 +12,6 @@
"com.unity.ugui": "1.0.0",
"com.unity.xr.interaction.toolkit": "2.1.0-pre.1",
"com.unity.xr.management": "4.2.1",
"com.unity.xr.oculus": "3.0.2",
"com.unity.xr.openxr": "1.4.2",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",

View File

@ -8,18 +8,18 @@
"hash": "0412fe09e11d3720197707a935f8114cc2454639"
},
"com.ultraleap.tracking": {
"version": "5.11.0",
"version": "5.13.0",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://package.openupm.com"
},
"com.ultraleap.tracking.openxr": {
"version": "1.0.0-pre.5",
"version": "1.0.0-pre.7",
"depth": 0,
"source": "registry",
"dependencies": {
"com.ultraleap.tracking": "5.7.0",
"com.ultraleap.tracking": "5.12.0",
"com.unity.xr.openxr": "1.3.1"
},
"url": "https://package.openupm.com"
@ -201,15 +201,6 @@
},
"url": "https://packages.unity.com"
},
"com.unity.xr.oculus": {
"version": "3.0.2",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.xr.management": "4.2.0"
},
"url": "https://packages.unity.com"
},
"com.unity.xr.openxr": {
"version": "1.4.2",
"depth": 0,

View File

@ -25,6 +25,20 @@ PresetManager:
type: 2}
m_Filter:
m_Disabled: 0
- first:
m_NativeTypeID: 114
m_ManagedTypePPtr: {fileID: 11500000, guid: caff514de9b15ad48ab85dcff5508221,
type: 3}
m_ManagedTypeFallback:
second:
- m_Preset: {fileID: 2655988077585873504, guid: 1421ad86ff3787b4dae70fe9e699a25f,
type: 2}
m_Filter: right
m_Disabled: 0
- m_Preset: {fileID: 2655988077585873504, guid: ffd8268f7307a0c48a067dad4a8fe060,
type: 2}
m_Filter: left
m_Disabled: 0
- first:
m_NativeTypeID: 114
m_ManagedTypePPtr: {fileID: 11500000, guid: 919e39492806b334982b6b84c90dd927,
@ -35,17 +49,3 @@ PresetManager:
type: 2}
m_Filter:
m_Disabled: 0
- first:
m_NativeTypeID: 114
m_ManagedTypePPtr: {fileID: 11500000, guid: caff514de9b15ad48ab85dcff5508221,
type: 3}
m_ManagedTypeFallback:
second:
- m_Preset: {fileID: 2655988077585873504, guid: 1421ad86ff3787b4dae70fe9e699a25f,
type: 2}
m_Filter:
m_Disabled: 0
- m_Preset: {fileID: 2655988077585873504, guid: ffd8268f7307a0c48a067dad4a8fe060,
type: 2}
m_Filter:
m_Disabled: 0

View File

@ -12,7 +12,7 @@ PlayerSettings:
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
companyName: xpeng
productName: WACVR
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}

View File

@ -8,7 +8,7 @@ TagManager:
- Default
- TransparentFX
- Ignore Raycast
-
- FPSHide
- Water
- UI
-

View File

@ -137,6 +137,7 @@ void mercury_io_touch_set_leds(struct led_data data)
{
if (FileMapping)
{
data.rgba[3] = 0xFF; //IPC enable flag
memcpy(FileMapping->RGBAData, data.rgba, 480 * 4);
}
//for (size_t i = 0; i < 32; i++)