diff --git a/Materials/DistortionRenderer.cs b/Materials/DistortionRenderer.cs index 3abe536..5865c2d 100644 --- a/Materials/DistortionRenderer.cs +++ b/Materials/DistortionRenderer.cs @@ -42,13 +42,13 @@ void EnforceCamera() if (distortionRT == null) { - distortionRT = RenderTexture.GetTemporary(Screen.width / (int) factor, Screen.height / (int) factor, 0); + distortionRT = new RenderTexture(Screen.width / (int) factor, Screen.height / (int) factor, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); } else if (distortionRT.width != Screen.width / (int) factor || distortionRT.height != Screen.height / (int) factor) { RenderTexture.Destroy(distortionRT); - distortionRT = RenderTexture.GetTemporary(Screen.width / (int) factor, Screen.height / (int) factor, 0); + distortionRT = new RenderTexture(Screen.width / (int) factor, Screen.height / (int) factor, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); } distortionRT.wrapMode = TextureWrapMode.Clamp; @@ -62,7 +62,7 @@ private void OnDisable() { if (distortionRT != null) { - //RenderTexture.Destroy(distortionRT); + RenderTexture.Destroy(distortionRT); } if (effectCamera != null) diff --git a/PPV2/PPVolume Profile.asset b/PPV2/PPVolume Profile.asset index 696a99b..198a64a 100644 --- a/PPV2/PPVolume Profile.asset +++ b/PPV2/PPVolume Profile.asset @@ -32,4 +32,4 @@ MonoBehaviour: value: 1 scale: overrideState: 1 - value: 0.091 + value: 0.0494 diff --git a/PPV2/pp2_example.unity b/PPV2/pp2_example.unity index 55a80f9..69c5df7 100644 --- a/PPV2/pp2_example.unity +++ b/PPV2/pp2_example.unity @@ -296,8 +296,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 19851885} - m_LocalRotation: {x: -0.002498239, y: 0.9947568, z: -0.09911575, w: -0.025073268} - m_LocalPosition: {x: 0.6810328, y: 2.4238636, z: 1.2470474} + m_LocalRotation: {x: -0.000018872555, y: 0.9998674, z: 0.016188996, w: 0.0018006602} + m_LocalPosition: {x: -0.15624666, y: -0.123598695, z: 4.295494} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -316,7 +316,7 @@ GameObject: - component: {fileID: 95850208} - component: {fileID: 95850207} m_Layer: 9 - m_Name: Quad + m_Name: distortionEffect m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -391,11 +391,11 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 95850206} m_LocalRotation: {x: 0, y: 1, z: 0, w: -0.00000016292068} - m_LocalPosition: {x: 0, y: 3.01, z: -2.81} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 5, y: 5, z: 5} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &210227022 GameObject: @@ -535,9 +535,9 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &892762036 +--- !u!1 &1808394311 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -545,27 +545,27 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 892762040} - - component: {fileID: 892762039} - - component: {fileID: 892762038} - - component: {fileID: 892762037} + - component: {fileID: 1808394315} + - component: {fileID: 1808394314} + - component: {fileID: 1808394313} + - component: {fileID: 1808394312} m_Layer: 0 - m_Name: Cube + m_Name: background m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!23 &892762037 +--- !u!23 &1808394312 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 892762036} + m_GameObject: {fileID: 1808394311} m_Enabled: 1 m_CastShadows: 1 - m_ReceiveShadows: 1 + m_ReceiveShadows: 0 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 @@ -595,38 +595,39 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!65 &892762038 -BoxCollider: +--- !u!64 &1808394313 +MeshCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 892762036} + m_GameObject: {fileID: 1808394311} m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &892762039 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1808394314 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 892762036} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &892762040 + m_GameObject: {fileID: 1808394311} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1808394315 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 892762036} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1.16, z: -6.41} + m_GameObject: {fileID: 1808394311} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: 0, y: 0, z: -0.35} m_LocalScale: {x: 5, y: 5, z: 5} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}