1
0
mirror of synced 2025-01-18 15:24:04 +01:00

fix only can select capture desktop; small improvements

Add Touch Panel Air Wall
Add Light Strength Slider
Fix some config panel slider issues
Add .blend file for cab
Fix small shader issue
This commit is contained in:
xpeng 2022-11-07 22:31:18 +01:00
parent 687f2c8ec4
commit da11ac7abc
16 changed files with 3760 additions and 2921 deletions

View File

@ -105,8 +105,9 @@ Material:
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _Alpha_Contrast: 2.5
- _Alpha_Multiplier: 3
- _Alpha_Brightness: 0.5
- _Alpha_Contrast: 0.9
- _Alpha_Multiplier: 7.5
- _Blend: 0
- _BumpScale: 1
- _ClearCoatMask: 0

View File

@ -23,6 +23,9 @@
},
{
"m_Id": "9eee7a17a47241ffbfc4fc8a57ad4e09"
},
{
"m_Id": "8491e4dac7524b18a4bd44dd7705b6f7"
}
],
"m_Keywords": [],
@ -116,6 +119,12 @@
},
{
"m_Id": "2f2e1ff57ed84414b6ffae2d80b8229d"
},
{
"m_Id": "bb8e9a9c5d98492a8c7e8f571b2d5507"
},
{
"m_Id": "b2aecaa072904a07b2ee471f35abcc05"
}
],
"m_GroupDatas": [],
@ -345,6 +354,20 @@
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "b2aecaa072904a07b2ee471f35abcc05"
},
"m_SlotId": 2
},
"m_InputSlot": {
"m_Node": {
"m_Id": "41e6c78a7ed64dfb8bc26dcf4b486bb9"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
@ -359,6 +382,20 @@
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "bb8e9a9c5d98492a8c7e8f571b2d5507"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "b2aecaa072904a07b2ee471f35abcc05"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
@ -368,7 +405,7 @@
},
"m_InputSlot": {
"m_Node": {
"m_Id": "41e6c78a7ed64dfb8bc26dcf4b486bb9"
"m_Id": "b2aecaa072904a07b2ee471f35abcc05"
},
"m_SlotId": 0
}
@ -920,6 +957,9 @@
{
"m_Id": "fbbb6cbccd3240ee93b203f186d8bbe2"
},
{
"m_Id": "8491e4dac7524b18a4bd44dd7705b6f7"
},
{
"m_Id": "9eee7a17a47241ffbfc4fc8a57ad4e09"
},
@ -1040,10 +1080,10 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -1000.0,
"y": 455.0,
"width": 166.00006103515626,
"height": 118.00006103515625
"x": -772.800048828125,
"y": 598.4000244140625,
"width": 208.00006103515626,
"height": 301.5999755859375
}
},
"m_Slots": [
@ -1059,7 +1099,7 @@
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_PreviewExpanded": true,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
@ -1090,6 +1130,30 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "43866a2d617a40ae99084a6a42bf61ae",
"m_Id": 2,
"m_DisplayName": "Out",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot",
@ -1137,7 +1201,7 @@
"m_FloatType": 1,
"m_RangeValues": {
"x": 0.0,
"y": 4.0
"y": 15.0
}
}
@ -1658,6 +1722,21 @@
"m_BareResource": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "721eada0fdb94f6398db4e78803a98c1",
"m_Id": 0,
"m_DisplayName": "Alpha Brightness",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
@ -2049,6 +2128,33 @@
"m_SerializedDescriptor": "SurfaceDescription.NormalTS"
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "8491e4dac7524b18a4bd44dd7705b6f7",
"m_Guid": {
"m_GuidSerialized": "a4179661-b119-48b5-9f12-d6c402eec235"
},
"m_Name": "Alpha Brightness",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "Alpha Brightness",
"m_DefaultReferenceName": "_Alpha_Brightness",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": 0.0,
"m_FloatType": 1,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot",
@ -2507,10 +2613,10 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -1401.0,
"y": 761.0,
"x": -1401.5999755859375,
"y": 764.0,
"width": 156.0,
"height": 34.0
"height": 33.5999755859375
}
},
"m_Slots": [
@ -2530,6 +2636,73 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "b0d17648b763413f8aeee92672eb4ef0",
"m_Id": 1,
"m_DisplayName": "B",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "B",
"m_StageCapability": 3,
"m_Value": {
"x": 1.0,
"y": 1.0,
"z": 1.0,
"w": 1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubtractNode",
"m_ObjectId": "b2aecaa072904a07b2ee471f35abcc05",
"m_Group": {
"m_Id": ""
},
"m_Name": "Subtract",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -1005.6000366210938,
"y": 540.0,
"width": 207.99993896484376,
"height": 301.60003662109377
}
},
"m_Slots": [
{
"m_Id": "d6c85ddf50744992947b2c7e713fb8ed"
},
{
"m_Id": "b0d17648b763413f8aeee92672eb4ef0"
},
{
"m_Id": "43866a2d617a40ae99084a6a42bf61ae"
}
],
"synonyms": [
"subtraction",
"remove",
"minus",
"take away"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
@ -2575,10 +2748,10 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -657.0,
"y": 471.0,
"width": 130.0,
"height": 118.0
"x": -519.9998779296875,
"y": 573.5999755859375,
"width": 129.59994506835938,
"height": 117.60003662109375
}
},
"m_Slots": [
@ -2629,6 +2802,41 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "bb8e9a9c5d98492a8c7e8f571b2d5507",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -1195.1998291015625,
"y": 661.5999755859375,
"width": 164.0,
"height": 33.60003662109375
}
},
"m_Slots": [
{
"m_Id": "721eada0fdb94f6398db4e78803a98c1"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "8491e4dac7524b18a4bd44dd7705b6f7"
}
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
@ -2733,6 +2941,30 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "d6c85ddf50744992947b2c7e713fb8ed",
"m_Id": 0,
"m_DisplayName": "A",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "A",
"m_StageCapability": 3,
"m_Value": {
"x": 1.0,
"y": 1.0,
"z": 1.0,
"w": 1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
@ -3096,7 +3328,7 @@
"m_FloatType": 1,
"m_RangeValues": {
"x": 0.0,
"y": 4.0
"y": 5.0
}
}

View File

@ -996,7 +996,7 @@
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.3499999940395355
"y": 0.30000001192092898
},
"m_DefaultValue": {
"x": 0.0,
@ -1603,10 +1603,10 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 708.5999755859375,
"y": 786.4000244140625,
"width": 0.0,
"height": 0.0
"x": 600.0,
"y": 997.5999755859375,
"width": 167.199951171875,
"height": 33.5999755859375
}
},
"m_Slots": [

View File

@ -25,8 +25,8 @@ Material:
type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 6
m_EnableInstancingVariants: 1
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
@ -128,7 +128,7 @@ Material:
- _Surface: 0
- _UVSec: 0
- _Vignett: 0.8
- _VignettHardness: -0.15
- _VignettHardness: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 35a3a1c54527298439df19df0f0ba820
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,106 @@
fileFormatVersion: 2
guid: b0a9d478c50f0c74891d9a527746f25a
ModelImporter:
serializedVersion: 21300
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 1
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -21,29 +21,34 @@ public class CaptureSettingManager : MonoBehaviour
var desktopIndexDropdown = desktopIndexWidget.GetComponent<TMP_Dropdown>();
modeDropdown.onValueChanged.AddListener((int value) => {
windowTexture.captureMode = (CaptureMode)Enum.GetValues(typeof(CaptureMode)).GetValue(value) - 1;
windowTexture.captureMode = (CaptureMode)value - 1;
Debug.Log("CaptureFPS: " + windowTexture.captureMode);
});
fpsDropdown.onValueChanged.AddListener((int value) => {
var fps = Enum.GetName(typeof(CEnum.FPS), value);
windowTexture.captureFrameRate = int.Parse(fps.Remove(0, 3));
Debug.Log("CaptureFPS: " + windowTexture.captureFrameRate);
});
desktopToggle.onValueChanged.AddListener((bool value) => {
if (value)
{
windowTexture.type = WindowTextureType.Desktop;
desktopIndexDropdown.interactable = true;
}
else
{
windowTexture.type = WindowTextureType.Desktop;
windowTexture.type = WindowTextureType.Window;
desktopIndexDropdown.interactable = false;
}
Debug.Log("CaptureTarget: " + windowTexture.type);
});
desktopIndexDropdown.onValueChanged.AddListener((int value) => {
windowTexture.desktopIndex = value;
Debug.Log("DesktopIndex: " + windowTexture.desktopIndex);
});
modeDropdown.onValueChanged?.Invoke(modeDropdown.value);
fpsDropdown.onValueChanged?.Invoke(fpsDropdown.value);

View File

@ -23,13 +23,12 @@ public class Config
public float HapticDuration = 0.1f;
public float HapticAmplitude = 0.75f;
public int TouchSampleRate = 3;
public int HandTrackingMode = 0;
public int HandTrackingMode = 1;
public float Threshold = 0.3f;
public float HandStabilVelocity = 0.3f;
public float HandStabilDistance = 0.1f;
public float HandStabilSmooth = 0.1f;
public bool TouchPanelAirWall = false;
public bool UseIPCLighting = true;
public bool UseIPCTouch = true;
public float LightStrength = 1.35f;
public int TestKeyBind = 40;
public int ServiceKeyBind = 41;
public int CoinKeyBind = 31;

View File

@ -127,30 +127,30 @@ public class ConfigManager : MonoBehaviour
{
var dropdown = widget.GetComponent<TMP_Dropdown>();
// add listener to dropdown to update config by key name
dropdown.onValueChanged.AddListener(delegate
dropdown.onValueChanged.AddListener((int value) =>
{
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
field.SetValue(config, dropdown.value);
field.SetValue(config, value);
onConfigChanged?.Invoke();
});
}
else if (widget.GetComponent<Toggle>() != null)
{
var toggle = widget.GetComponent<Toggle>();
toggle.onValueChanged.AddListener(delegate
toggle.onValueChanged.AddListener((bool value) =>
{
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
field.SetValue(config, toggle.isOn);
field.SetValue(config, value);
onConfigChanged?.Invoke();
});
}
else if (widget.GetComponent<Slider>() != null)
{
var slider = widget.GetComponent<Slider>();
slider.onValueChanged.AddListener(delegate
slider.onValueChanged.AddListener((float value) =>
{
var field = config.GetType().GetField(configPanelComponent.ConfigKeyName);
field.SetValue(config, slider.value);
field.SetValue(config, value);
onConfigChanged?.Invoke();
});
}

View File

@ -25,7 +25,7 @@ public class HandFollowManager : MonoBehaviour
var threshSlider = threshWidget.GetComponent<Slider>();
modeDropdown.onValueChanged.AddListener((int value) => {
VelocityThreshold = ConfigManager.config.HandStabilVelocity;
VelocityThreshold = ConfigManager.config.Threshold;
Mode = (CEnum.handStabilization)value;
switch (Mode)
{

View File

@ -18,16 +18,27 @@ public class LightManager : MonoBehaviour
private void Start()
{
var widget = ConfigManager.GetConfigPanelWidget("UseIPCLighting");
var toggle = widget.GetComponent<Toggle>();
toggle.onValueChanged.AddListener((value) => {
useIPCLighting = value;
});
toggle.onValueChanged.Invoke(useIPCLighting);
for (int i = 0; i < Lights.Count; i++)
Materials.Add(Lights[i].GetComponent<Renderer>().material);
var lightWidget = ConfigManager.GetConfigPanelWidget("UseIPCLighting");
var strengthWidgent = ConfigManager.GetConfigPanelWidget("LightStrength");
var lightToggle = lightWidget.GetComponent<Toggle>();
var strengthSlider = strengthWidgent.GetComponent<Slider>();
lightToggle.onValueChanged.AddListener((bool value) => {
useIPCLighting = value;
});
strengthSlider.onValueChanged.AddListener((float value) => {
for (int i = 0; i < Materials.Count; i++)
Materials[i].SetFloat("_EmissionStrength", value);
});
lightToggle.onValueChanged.Invoke(useIPCLighting);
strengthSlider.onValueChanged.Invoke(strengthSlider.value);
if (useIPCLighting)
{
RGBColor2D = new Texture2D(480, 1, TextureFormat.RGBA32, false);

View File

@ -15,7 +15,7 @@ public class ColliderToTouch : MonoBehaviour
{
Area = Convert.ToInt32(gameObject.name);
}
private void OnTriggerEnter(Collider other)
private void OnTriggerEnter(Collider collider)
{
_insideColliderCount += 1;
TouchManager.SetTouch(Area, true);
@ -23,7 +23,7 @@ public class ColliderToTouch : MonoBehaviour
LightManager.UpdateFadeLight(Area, true);
}
private void OnTriggerExit(Collider other)
private void OnTriggerExit(Collider collider)
{
_insideColliderCount -= 1;
_insideColliderCount = Mathf.Max(0, _insideColliderCount);

View File

@ -21,7 +21,7 @@ QualitySettings:
skinWeights: 2
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 2
antiAliasing: 0
softParticles: 0
softVegetation: 0
realtimeReflectionProbes: 1