VR portal rendering
This commit is contained in:
13
Assets/Escape Room Engine/Portal/PlayerCamera.cs
Normal file
13
Assets/Escape Room Engine/Portal/PlayerCamera.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Escape_Room_Engine.Portal
|
||||
{
|
||||
public class PlayerCamera : MonoBehaviour
|
||||
{
|
||||
public Camera camera;
|
||||
[SerializeField] private Transform leftEye, rightEye;
|
||||
|
||||
public Transform getEyeTransform(Camera.StereoscopicEye eye) =>
|
||||
eye == Camera.StereoscopicEye.Left ? leftEye : rightEye;
|
||||
}
|
||||
}
|
||||
11
Assets/Escape Room Engine/Portal/PlayerCamera.cs.meta
Normal file
11
Assets/Escape Room Engine/Portal/PlayerCamera.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2ceb62217b416743baa8beee7109cfb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,22 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using UnityEngine.XR;
|
||||
|
||||
namespace Escape_Room_Engine.Portal
|
||||
{
|
||||
public class Portal : MonoBehaviour
|
||||
{
|
||||
private static readonly Matrix4x4 HalfRotation = Matrix4x4.Rotate(Quaternion.Euler(0, 180, 0));
|
||||
|
||||
private static readonly Camera.StereoscopicEye[] Eyes =
|
||||
{ Camera.StereoscopicEye.Left, Camera.StereoscopicEye.Right };
|
||||
private static readonly Dictionary<Camera.StereoscopicEye, int> EyeTextureNames = new()
|
||||
{
|
||||
{ Camera.StereoscopicEye.Left, Shader.PropertyToID("_LeftTex") },
|
||||
{ Camera.StereoscopicEye.Right, Shader.PropertyToID("_RightTex") }
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The portal that is connected with this one.
|
||||
/// </summary>
|
||||
public Portal other;
|
||||
/// <summary>
|
||||
/// The main camera to take the position for the portal camera from.
|
||||
/// The minimum near clip plane distance to be used when calculating the oblique clip plane.
|
||||
/// </summary>
|
||||
[SerializeField] private Camera playerCamera;
|
||||
public float minNearClipPlane = 0.02f;
|
||||
/// <summary>
|
||||
/// The camera that will draw the view for this portal.
|
||||
/// </summary>
|
||||
@@ -26,24 +35,17 @@ namespace Escape_Room_Engine.Portal
|
||||
/// </summary>
|
||||
[SerializeField] private MeshRenderer portalQuad;
|
||||
|
||||
private RenderTexture _texture;
|
||||
private PlayerCamera _playerCamera;
|
||||
private Dictionary<Camera.StereoscopicEye, RenderTexture> _textures = new();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// check whether the other portal is set up
|
||||
if (!other || other.other != this) throw new Exception("Other Portal not set up correctly.");
|
||||
// check whether the player camera is set up
|
||||
if (!playerCamera) throw new Exception("No camera initialised.");
|
||||
if (!other || other.other != this) throw new Exception("Other portal not set up correctly.");
|
||||
|
||||
// create render texture
|
||||
if (!_texture) _texture = new RenderTexture(Screen.width, Screen.height, 24, RenderTextureFormat.ARGB32);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// assign render texture
|
||||
portalCamera.targetTexture = _texture;
|
||||
other.portalQuad.material.mainTexture = _texture;
|
||||
// get player camera
|
||||
if (Camera.main != null) _playerCamera = Camera.main.GetComponent<PlayerCamera>();
|
||||
else throw new Exception("Main camera has no player camera script set up.");
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
@@ -59,22 +61,42 @@ namespace Escape_Room_Engine.Portal
|
||||
private void Render(ScriptableRenderContext scriptableRenderContext, Camera camera)
|
||||
{
|
||||
var t = transform;
|
||||
|
||||
// position portal camera
|
||||
var portalCameraMatrix = t.localToWorldMatrix * HalfRotation * other.transform.worldToLocalMatrix *
|
||||
playerCamera.transform.localToWorldMatrix;
|
||||
portalCamera.transform.SetPositionAndRotation(portalCameraMatrix.GetPosition(), portalCameraMatrix.rotation);
|
||||
|
||||
// set camera clip plane to portal (otherwise the wall behind the portal would be rendered)
|
||||
// calculating the clip plane: https://computergraphics.stackexchange.com/a/1506
|
||||
var n = -t.forward; // clip plane normal
|
||||
var portalPlane = new Plane(n, t.position); // clip plane in world space
|
||||
var clipPlane = portalCamera.worldToCameraMatrix.inverse.transpose *
|
||||
new Vector4(n.x, n.y, n.z, portalPlane.distance); // vector format clip plane in camera space
|
||||
portalCamera.projectionMatrix = playerCamera.CalculateObliqueMatrix(clipPlane);
|
||||
|
||||
// render portal view
|
||||
UniversalRenderPipeline.RenderSingleCamera(scriptableRenderContext, portalCamera);
|
||||
|
||||
foreach (var eye in Eyes)
|
||||
{
|
||||
// create portal texture if it doesn't exist yet
|
||||
if (!_textures.ContainsKey(eye))
|
||||
{
|
||||
if (XRSettings.eyeTextureWidth > 0 && XRSettings.eyeTextureHeight > 0)
|
||||
{
|
||||
_textures.Add(eye,
|
||||
new RenderTexture(XRSettings.eyeTextureWidth, XRSettings.eyeTextureHeight, 24));
|
||||
other.portalQuad.material.SetTexture(EyeTextureNames[eye], _textures[eye]);
|
||||
}
|
||||
else // no texture was created so nothing should be rendered
|
||||
continue;
|
||||
}
|
||||
|
||||
// position portal camera
|
||||
var m = t.localToWorldMatrix * HalfRotation * other.transform.worldToLocalMatrix *
|
||||
_playerCamera.getEyeTransform(eye).localToWorldMatrix;
|
||||
portalCamera.transform.SetPositionAndRotation(m.GetPosition(), m.rotation);
|
||||
portalCamera.projectionMatrix = _playerCamera.camera.GetStereoProjectionMatrix(eye);
|
||||
|
||||
// set camera clip plane to portal (otherwise the wall behind the portal would be rendered)
|
||||
// calculating the clip plane: https://computergraphics.stackexchange.com/a/1506
|
||||
var n = -t.forward; // clip plane normal
|
||||
var portalPlane = new Plane(n, t.position); // clip plane in world space
|
||||
var clipPlane = portalCamera.worldToCameraMatrix.inverse.transpose *
|
||||
new Vector4(n.x, n.y, n.z, portalPlane.distance); // vector format clip plane in camera space
|
||||
if (Math.Abs(portalPlane.GetDistanceToPoint(portalCamera.transform.position)) >= minNearClipPlane)
|
||||
// only adjust the near clip plane if it doesn't intersect with the camera
|
||||
portalCamera.projectionMatrix = portalCamera.CalculateObliqueMatrix(clipPlane);
|
||||
|
||||
// render portal view
|
||||
portalCamera.targetTexture = _textures[eye];
|
||||
UniversalRenderPipeline.RenderSingleCamera(scriptableRenderContext, portalCamera);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ Material:
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
|
||||
@@ -48,7 +48,6 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
other: {fileID: 0}
|
||||
playerCamera: {fileID: 0}
|
||||
portalCamera: {fileID: 7791795762741173939}
|
||||
portalQuad: {fileID: 6216133567950691622}
|
||||
--- !u!1 &6911937082098131204
|
||||
@@ -239,7 +238,7 @@ MonoBehaviour:
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowXRRendering: 0
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
|
||||
@@ -2,12 +2,13 @@ Shader "Escape Room Engine/Portal"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex("Portal Texture", 2D) = "" {}
|
||||
_LeftTex("Left Eye Texture", 2D) = "" {}
|
||||
_RightTex("Right Eye Texture", 2D) = "" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" "Queue" = "Geometry" }
|
||||
Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" }
|
||||
|
||||
Pass
|
||||
{
|
||||
@@ -21,33 +22,45 @@ Shader "Escape Room Engine/Portal"
|
||||
HLSLPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#pragma multi_compile_instancing
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
uniform sampler2D _MainTex;
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 positionOS : POSITION;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float4 screen : TEXCOORD0;
|
||||
float4 positionHCS : SV_POSITION;
|
||||
float4 positionScreen : TEXCOORD0;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
uniform sampler2D _LeftTex, _RightTex;
|
||||
|
||||
Varyings vert(Attributes IN)
|
||||
{
|
||||
Varyings OUT;
|
||||
OUT.vertex = TransformObjectToHClip(IN.vertex.xyz);
|
||||
OUT.screen = ComputeScreenPos(OUT.vertex);
|
||||
UNITY_SETUP_INSTANCE_ID(IN);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
|
||||
OUT.positionHCS = TransformObjectToHClip(IN.positionOS.xyz);
|
||||
// calculate the screen position which is used to map the portal texture onto the portal
|
||||
OUT.positionScreen = ComputeScreenPos(OUT.positionHCS);
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
half4 frag(Varyings IN) : SV_Target
|
||||
{
|
||||
return tex2D(_MainTex, IN.screen.xy / IN.screen.w);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||||
|
||||
const float2 uv = IN.positionScreen.xy / IN.positionScreen.w;
|
||||
|
||||
// sample from the correct texture depending on the eye rendered
|
||||
return unity_StereoEyeIndex == 0 ? tex2D(_LeftTex, uv) : tex2D(_RightTex, uv);
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
@@ -123,6 +123,111 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &49933501
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 49933502}
|
||||
- component: {fileID: 49933503}
|
||||
m_Layer: 0
|
||||
m_Name: Left Eye
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &49933502
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 49933501}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 62537129}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &49933503
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 49933501}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c2fadf230d1919748a9aa21d40f74619, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_TrackingType: 0
|
||||
m_UpdateType: 0
|
||||
m_PositionInput:
|
||||
m_UseReference: 0
|
||||
m_Action:
|
||||
m_Name: Position Input
|
||||
m_Type: 0
|
||||
m_ExpectedControlType:
|
||||
m_Id: 50edf581-87d3-4af1-94fe-26f6442fa934
|
||||
m_Processors:
|
||||
m_Interactions:
|
||||
m_SingletonActionBindings:
|
||||
- m_Name:
|
||||
m_Id: d9c52bb2-8d89-408d-a19d-8addbcd462ec
|
||||
m_Path: <XRHMD>/leftEyePosition
|
||||
m_Interactions:
|
||||
m_Processors:
|
||||
m_Groups:
|
||||
m_Action: Position Input
|
||||
m_Flags: 0
|
||||
m_Flags: 0
|
||||
m_Reference: {fileID: 0}
|
||||
m_RotationInput:
|
||||
m_UseReference: 0
|
||||
m_Action:
|
||||
m_Name: Rotation Input
|
||||
m_Type: 0
|
||||
m_ExpectedControlType:
|
||||
m_Id: 45da0b8d-d308-4e0a-afb5-d868e344ec24
|
||||
m_Processors:
|
||||
m_Interactions:
|
||||
m_SingletonActionBindings:
|
||||
- m_Name:
|
||||
m_Id: d39c7ce1-409f-49fa-9d44-b819774e7166
|
||||
m_Path: <XRHMD>/leftEyeRotation
|
||||
m_Interactions:
|
||||
m_Processors:
|
||||
m_Groups:
|
||||
m_Action: Rotation Input
|
||||
m_Flags: 0
|
||||
m_Flags: 0
|
||||
m_Reference: {fileID: 0}
|
||||
m_PositionAction:
|
||||
m_Name:
|
||||
m_Type: 0
|
||||
m_ExpectedControlType:
|
||||
m_Id:
|
||||
m_Processors:
|
||||
m_Interactions:
|
||||
m_SingletonActionBindings: []
|
||||
m_Flags: 0
|
||||
m_RotationAction:
|
||||
m_Name:
|
||||
m_Type: 0
|
||||
m_ExpectedControlType:
|
||||
m_Id:
|
||||
m_Processors:
|
||||
m_Interactions:
|
||||
m_SingletonActionBindings: []
|
||||
m_Flags: 0
|
||||
m_HasMigratedActions: 1
|
||||
--- !u!1 &52010740
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -152,7 +257,6 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1199088360}
|
||||
- {fileID: 1984169765}
|
||||
- {fileID: 7295752538729181700}
|
||||
- {fileID: 2061968364}
|
||||
- {fileID: 1363513912}
|
||||
@@ -188,6 +292,8 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 250613599}
|
||||
- {fileID: 49933502}
|
||||
- {fileID: 1755438915}
|
||||
- {fileID: 734697822}
|
||||
- {fileID: 613892734}
|
||||
m_Father: {fileID: 1274381187}
|
||||
@@ -694,6 +800,37 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 161783873}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &195513901
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 195513902}
|
||||
m_Layer: 0
|
||||
m_Name: Left Eye
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &195513902
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 195513901}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.035, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1199088360}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &250613598
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -707,6 +844,7 @@ GameObject:
|
||||
- component: {fileID: 250613602}
|
||||
- component: {fileID: 250613601}
|
||||
- component: {fileID: 250613600}
|
||||
- component: {fileID: 250613604}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
@@ -902,6 +1040,21 @@ Camera:
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!114 &250613604
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 250613598}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b2ceb62217b416743baa8beee7109cfb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
camera: {fileID: 250613603}
|
||||
leftEye: {fileID: 49933502}
|
||||
rightEye: {fileID: 1755438915}
|
||||
--- !u!1 &289664350
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1543,7 +1696,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 62537129}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &613892735
|
||||
MonoBehaviour:
|
||||
@@ -1847,7 +2000,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 62537129}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &734697823
|
||||
MonoBehaviour:
|
||||
@@ -2349,6 +2502,37 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 778138609}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &817509150
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 817509151}
|
||||
m_Layer: 0
|
||||
m_Name: Right Eye
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &817509151
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 817509150}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.035, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1199088360}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &832575517
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2870,6 +3054,7 @@ GameObject:
|
||||
- component: {fileID: 1199088357}
|
||||
- component: {fileID: 1199088359}
|
||||
- component: {fileID: 1199088358}
|
||||
- component: {fileID: 1199088361}
|
||||
m_Layer: 0
|
||||
m_Name: Test Camera
|
||||
m_TagString: MainCamera
|
||||
@@ -2949,7 +3134,7 @@ MonoBehaviour:
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 0
|
||||
m_AllowXRRendering: 1
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
@@ -2972,10 +3157,27 @@ Transform:
|
||||
m_LocalPosition: {x: -0, y: 1.193, z: -2.275}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 195513902}
|
||||
- {fileID: 817509151}
|
||||
m_Father: {fileID: 52010741}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1199088361
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1199088356}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b2ceb62217b416743baa8beee7109cfb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
camera: {fileID: 1199088357}
|
||||
leftEye: {fileID: 195513902}
|
||||
rightEye: {fileID: 817509151}
|
||||
--- !u!1 &1274381185
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3157,7 +3359,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 52010741}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!135 &1363513913
|
||||
SphereCollider:
|
||||
@@ -3599,7 +3801,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1718957585
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3724,6 +3926,111 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1719908310}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1755438914
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1755438915}
|
||||
- component: {fileID: 1755438916}
|
||||
m_Layer: 0
|
||||
m_Name: Right Eye
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1755438915
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1755438914}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 62537129}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1755438916
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1755438914}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c2fadf230d1919748a9aa21d40f74619, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_TrackingType: 0
|
||||
m_UpdateType: 0
|
||||
m_PositionInput:
|
||||
m_UseReference: 0
|
||||
m_Action:
|
||||
m_Name: Position Input
|
||||
m_Type: 0
|
||||
m_ExpectedControlType:
|
||||
m_Id: 50edf581-87d3-4af1-94fe-26f6442fa934
|
||||
m_Processors:
|
||||
m_Interactions:
|
||||
m_SingletonActionBindings:
|
||||
- m_Name:
|
||||
m_Id: 5ac0bbd3-d284-4b6c-9ad8-52b1a7b4e898
|
||||
m_Path: <XRHMD>/rightEyePosition
|
||||
m_Interactions:
|
||||
m_Processors:
|
||||
m_Groups:
|
||||
m_Action: Position Input
|
||||
m_Flags: 0
|
||||
m_Flags: 0
|
||||
m_Reference: {fileID: 0}
|
||||
m_RotationInput:
|
||||
m_UseReference: 0
|
||||
m_Action:
|
||||
m_Name: Rotation Input
|
||||
m_Type: 0
|
||||
m_ExpectedControlType:
|
||||
m_Id: 45da0b8d-d308-4e0a-afb5-d868e344ec24
|
||||
m_Processors:
|
||||
m_Interactions:
|
||||
m_SingletonActionBindings:
|
||||
- m_Name:
|
||||
m_Id: d39c7ce1-409f-49fa-9d44-b819774e7166
|
||||
m_Path: <XRHMD>/rightEyeRotation
|
||||
m_Interactions:
|
||||
m_Processors:
|
||||
m_Groups:
|
||||
m_Action: Rotation Input
|
||||
m_Flags: 0
|
||||
m_Flags: 0
|
||||
m_Reference: {fileID: 0}
|
||||
m_PositionAction:
|
||||
m_Name:
|
||||
m_Type: 0
|
||||
m_ExpectedControlType:
|
||||
m_Id:
|
||||
m_Processors:
|
||||
m_Interactions:
|
||||
m_SingletonActionBindings: []
|
||||
m_Flags: 0
|
||||
m_RotationAction:
|
||||
m_Name:
|
||||
m_Type: 0
|
||||
m_ExpectedControlType:
|
||||
m_Id:
|
||||
m_Processors:
|
||||
m_Interactions:
|
||||
m_SingletonActionBindings: []
|
||||
m_Flags: 0
|
||||
m_HasMigratedActions: 1
|
||||
--- !u!1 &1882294794
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3954,124 +4261,6 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1882294794}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1984169764
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1984169765}
|
||||
- component: {fileID: 1984169768}
|
||||
- component: {fileID: 1984169767}
|
||||
- component: {fileID: 1984169766}
|
||||
m_Layer: 0
|
||||
m_Name: Test VR Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &1984169765
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1984169764}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1.193, z: -2.275}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 52010741}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1984169766
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1984169764}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
--- !u!81 &1984169767
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1984169764}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1984169768
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1984169764}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!1 &2061968363
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -4104,7 +4293,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 52010741}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!64 &2061968365
|
||||
MeshCollider:
|
||||
@@ -4422,7 +4611,7 @@ PrefabInstance:
|
||||
- target: {fileID: 2246995198243242195, guid: c50e7df1078c96f46bc6825f7e422fb7,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2246995198243242195, guid: c50e7df1078c96f46bc6825f7e422fb7,
|
||||
type: 3}
|
||||
|
||||
Reference in New Issue
Block a user