Skip to content

Commit

Permalink
update to HoloPlay-Unity-Plugin-1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
borongyuan committed Apr 27, 2022
1 parent 43e81c1 commit 7a792b5
Show file tree
Hide file tree
Showing 189 changed files with 8,687 additions and 17,894 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ public override void Render(PostProcessRenderContext context)
if (settings.holoplayDrivenFocus.value) {
var hp = context.camera.GetComponent<LookingGlass.Holoplay>();
if (hp != null) {
focusDistance = Mathf.Abs(hp.camDist);
focalLength = Mathf.Abs(hp.camDist * settings.holoplayIntensity.value);
aperture = Mathf.Abs(hp.camDist / settings.holoplayIntensity.value);
focusDistance = Mathf.Abs(hp.CameraDistance);
focalLength = Mathf.Abs(hp.CameraDistance * settings.holoplayIntensity.value);
aperture = Mathf.Abs(hp.CameraDistance / settings.holoplayIntensity.value);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@ private static HoloplayPostProcessSetupData OnPostProcessSetup(Holoplay behaviou
PostProcessLayer postLayer = behaviour.GetComponent<PostProcessLayer>();
if (postLayer != null && postLayer.enabled) {
output.postProcessCamera = behaviour.GetComponent<Camera>();
output.postProcessCamera.hideFlags = HideFlags.HideInInspector;

GameObject rawCamera = new GameObject(Holoplay.SingleViewCameraName);
rawCamera.hideFlags = HideFlags.HideAndDontSave;
rawCamera.transform.SetParent(behaviour.transform);
rawCamera.transform.localPosition = Vector3.zero;
rawCamera.transform.localRotation = Quaternion.identity;
output.camera = rawCamera.AddComponent<Camera>();
output.camera.CopyFrom(output.postProcessCamera);

GameObject singleViewCamera = new GameObject(Holoplay.SingleViewCameraName);
singleViewCamera.transform.SetParent(behaviour.transform);
singleViewCamera.transform.localPosition = Vector3.zero;
singleViewCamera.transform.localRotation = Quaternion.identity;
output.singleViewCamera = singleViewCamera.AddComponent<Camera>();
output.singleViewCamera.CopyFrom(output.postProcessCamera);
}

return output;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ PrefabInstance:
propertyPath: field of view
value: 14
objectReference: {fileID: 0}
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: m_TargetEye
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114865344359803568, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: quiltRT
Expand Down
29 changes: 27 additions & 2 deletions ArmRobot/Assets/Holoplay/Examples/2 - Placing Text.unity
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ PrefabInstance:
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: near clip plane
value: 149.6763
value: 152.88693
objectReference: {fileID: 0}
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
Expand All @@ -524,7 +524,12 @@ PrefabInstance:
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: far clip plane
value: 237.78629
value: 242.88693
objectReference: {fileID: 0}
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: m_TargetEye
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114865344359803568, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
Expand Down Expand Up @@ -586,6 +591,26 @@ PrefabInstance:
propertyPath: customQuiltSettings.aspect
value: 0.75
objectReference: {fileID: 0}
- target: {fileID: 114865344359803568, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: targetLKGName
value:
objectReference: {fileID: 0}
- target: {fileID: 114865344359803568, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: quiltTexture
value:
objectReference: {fileID: 0}
- target: {fileID: 114865344359803568, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: cameraData.size
value: 20
objectReference: {fileID: 0}
- target: {fileID: 114865344359803568, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: m_Size
value: 20
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3019d4eebe2593e428d7b9ccb096ceda, type: 3}
--- !u!1 &1625520487
Expand Down
7 changes: 6 additions & 1 deletion ArmRobot/Assets/Holoplay/Examples/3 - Post Processing.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ PrefabInstance:
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: field of view
value: 135
value: 14
objectReference: {fileID: 0}
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
Expand All @@ -1367,6 +1367,11 @@ PrefabInstance:
propertyPath: m_projectionMatrixMode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: m_TargetEye
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114865344359803568, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: quiltRT
Expand Down
5 changes: 5 additions & 0 deletions ArmRobot/Assets/Holoplay/Examples/4 - 3D Cursor.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,11 @@ PrefabInstance:
propertyPath: m_projectionMatrixMode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: m_TargetEye
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114865344359803568, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: quiltRT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,18 @@ PrefabInstance:
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: near clip plane
value: 33.221733
value: 38.221733
objectReference: {fileID: 0}
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: field of view
value: 14
objectReference: {fileID: 0}
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: m_TargetEye
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114865344359803568, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: quiltRT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,11 @@ PrefabInstance:
propertyPath: field of view
value: 14
objectReference: {fileID: 0}
- target: {fileID: 20959260662082832, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: m_TargetEye
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114865344359803568, guid: 3019d4eebe2593e428d7b9ccb096ceda,
type: 3}
propertyPath: quiltRT
Expand Down
Loading

0 comments on commit 7a792b5

Please sign in to comment.