diff --git a/Assets/Animations/Hero Pack/textures/Adam_body_Metal.tif.meta b/Assets/Animations/Hero Pack/textures/Adam_body_Metal.tif.meta index 7d994175..2a836208 100644 --- a/Assets/Animations/Hero Pack/textures/Adam_body_Metal.tif.meta +++ b/Assets/Animations/Hero Pack/textures/Adam_body_Metal.tif.meta @@ -1,54 +1,73 @@ fileFormatVersion: 2 guid: dbfe54f978fa34e47bd59fde0782db88 -timeCreated: 1457367634 -licenseType: Store +timeCreated: 1507069001 +licenseType: Free TextureImporter: fileIDToRecycleName: {} - serializedVersion: 2 + serializedVersion: 4 mipmaps: mipMapMode: 0 enableMipMap: 1 + sRGBTexture: 0 linearTexture: 0 - correctGamma: 0 fadeOut: 0 borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 mipMapFadeDistanceStart: 1 mipMapFadeDistanceEnd: 3 bumpmap: convertToNormalMap: 0 externalNormalMap: 0 - heightScale: .25 + heightScale: 0.25 normalMapFilter: 0 isReadable: 0 grayScaleToAlpha: 0 - generateCubemap: 0 + generateCubemap: 6 cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 seamlessCubemap: 0 textureFormat: -3 maxTextureSize: 2048 textureSettings: + serializedVersion: 2 filterMode: -1 aniso: -1 mipBias: -1 - wrapMode: -1 + wrapU: -1 + wrapV: -1 + wrapW: -1 nPOTScale: 1 lightmap: 0 - rGBM: 0 compressionQuality: 50 spriteMode: 0 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 - spritePivot: {x: .5, y: .5} + spritePivot: {x: 0.5, y: 0.5} spriteBorder: {x: 0, y: 0, z: 0, w: 0} spritePixelsToUnits: 100 + alphaUsage: 1 alphaIsTransparency: 0 - textureType: -1 - buildTargetSettings: [] + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 spriteSheet: + serializedVersion: 2 sprites: [] + outline: [] + physicsShape: [] spritePackingTag: userData: assetBundleName: diff --git a/Assets/Animations/Interactions Pack/Materials/body_color_map.mat b/Assets/Animations/Interactions Pack/Materials/body_color_map.mat new file mode 100644 index 00000000..7090c440 Binary files /dev/null and b/Assets/Animations/Interactions Pack/Materials/body_color_map.mat differ diff --git a/Assets/Animations/Interactions Pack/Materials/body_color_map.mat.meta b/Assets/Animations/Interactions Pack/Materials/body_color_map.mat.meta new file mode 100644 index 00000000..8643d387 --- /dev/null +++ b/Assets/Animations/Interactions Pack/Materials/body_color_map.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: dd9182638ceb3b24383e2d487bf2e847 +timeCreated: 1506988874 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat b/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat new file mode 100644 index 00000000..8c48eb22 Binary files /dev/null and b/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat differ diff --git a/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat.meta b/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat.meta new file mode 100644 index 00000000..f120f3d5 --- /dev/null +++ b/Assets/Animations/Interactions Pack/Materials/eyes_color_map.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: faaf20dc04b75f14d9bfdc5655dcd208 +timeCreated: 1506988873 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Interactions Pack/Materials/face_color_map.mat b/Assets/Animations/Interactions Pack/Materials/face_color_map.mat new file mode 100644 index 00000000..41152e66 Binary files /dev/null and b/Assets/Animations/Interactions Pack/Materials/face_color_map.mat differ diff --git a/Assets/Animations/Interactions Pack/Materials/face_color_map.mat.meta b/Assets/Animations/Interactions Pack/Materials/face_color_map.mat.meta new file mode 100644 index 00000000..ba02efad --- /dev/null +++ b/Assets/Animations/Interactions Pack/Materials/face_color_map.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1719407246f5c8a46a3f92d85dd03c2c +timeCreated: 1506988874 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Locomotion Pack/JumpUpHigh.fbm.meta b/Assets/Animations/Locomotion Pack/JumpUpHigh.fbm.meta index debfe01c..5fc1cce5 100644 --- a/Assets/Animations/Locomotion Pack/JumpUpHigh.fbm.meta +++ b/Assets/Animations/Locomotion Pack/JumpUpHigh.fbm.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 4d5edd609ec44354ab4345b98336a3e9 +guid: 23ffe7ce60e4c284aafdc5fd803f9132 folderAsset: yes -timeCreated: 1473618296 +timeCreated: 1506988916 licenseType: Free DefaultImporter: userData: diff --git a/Assets/Resources/Materials/Pink.mat b/Assets/Resources/Materials/Pink.mat new file mode 100644 index 00000000..7322e297 Binary files /dev/null and b/Assets/Resources/Materials/Pink.mat differ diff --git a/Assets/Resources/Materials/Pink.mat.meta b/Assets/Resources/Materials/Pink.mat.meta new file mode 100644 index 00000000..808acc4e --- /dev/null +++ b/Assets/Resources/Materials/Pink.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9f841ecc5e1e33a46b47b343c35a72b9 +timeCreated: 1507000107 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Materials/grass_texture_four.mat b/Assets/Resources/Materials/grass_texture_four.mat new file mode 100644 index 00000000..42581226 Binary files /dev/null and b/Assets/Resources/Materials/grass_texture_four.mat differ diff --git a/Assets/Resources/Materials/grass_texture_four.mat.meta b/Assets/Resources/Materials/grass_texture_four.mat.meta new file mode 100644 index 00000000..427e368f --- /dev/null +++ b/Assets/Resources/Materials/grass_texture_four.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7b10914c2c57b83439e5617d528bd1e9 +timeCreated: 1506990702 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Materials/mental.mat b/Assets/Resources/Materials/mental.mat new file mode 100644 index 00000000..2fad5d14 Binary files /dev/null and b/Assets/Resources/Materials/mental.mat differ diff --git a/Assets/Resources/Materials/mental.mat.meta b/Assets/Resources/Materials/mental.mat.meta new file mode 100644 index 00000000..1120d239 --- /dev/null +++ b/Assets/Resources/Materials/mental.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 38f45fbe051657d409fe14ce224e8d61 +timeCreated: 1507068248 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Materials/toon_wood_plank.mat b/Assets/Resources/Materials/toon_wood_plank.mat index db35a738..e9ae0f1d 100644 Binary files a/Assets/Resources/Materials/toon_wood_plank.mat and b/Assets/Resources/Materials/toon_wood_plank.mat differ diff --git a/Assets/Resources/Materials/try.mat b/Assets/Resources/Materials/try.mat new file mode 100644 index 00000000..a55010e0 Binary files /dev/null and b/Assets/Resources/Materials/try.mat differ diff --git a/Assets/Resources/Materials/try.mat.meta b/Assets/Resources/Materials/try.mat.meta new file mode 100644 index 00000000..186bdf01 --- /dev/null +++ b/Assets/Resources/Materials/try.mat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e3873c4e3dab08441883289a50c504ba +timeCreated: 1507068644 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Textures/mirror_texture.renderTexture b/Assets/Resources/Textures/mirror_texture.renderTexture new file mode 100644 index 00000000..c0d87ece Binary files /dev/null and b/Assets/Resources/Textures/mirror_texture.renderTexture differ diff --git a/Assets/Resources/Textures/mirror_texture.renderTexture.meta b/Assets/Resources/Textures/mirror_texture.renderTexture.meta new file mode 100644 index 00000000..2c963a12 --- /dev/null +++ b/Assets/Resources/Textures/mirror_texture.renderTexture.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7d4e00290573c074e856c1b8d26f7efd +timeCreated: 1507010338 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Playground.unity b/Assets/Scenes/Playground.unity index fba5c8e6..26b0f576 100644 Binary files a/Assets/Scenes/Playground.unity and b/Assets/Scenes/Playground.unity differ diff --git a/Assets/Scripts/MainController.cs b/Assets/Scripts/MainController.cs new file mode 100644 index 00000000..0246979a --- /dev/null +++ b/Assets/Scripts/MainController.cs @@ -0,0 +1,218 @@ +using System; +using UnityEngine; + +public class MainController : MonoBehaviour { + + #region Enums + + public enum TOGGLE_MODE : int { + TARGET_OBJECT = KeyCode.F1, + TARGET_CAMERA = KeyCode.F2 + } + + public enum KEYBOARD_INPUT : int { + SPEED_MODIFIER = KeyCode.LeftShift, + SPACE_MODIFIER = KeyCode.F3, + YAW_POS = KeyCode.D, + YAW_NEG = KeyCode.A, + PITCH_POS = KeyCode.W, + PITCH_NEG = KeyCode.S, + ROLL_POS = KeyCode.Q, + ROLL_NEG = KeyCode.E, + FORWARD = KeyCode.W, + BACKWARDS = KeyCode.S, + LEFT_STRAFE = KeyCode.A, + RIGHT_STRAFE = KeyCode.D, + LEFT_ROTATE = KeyCode.Q, + RIGHT_ROTATE = KeyCode.E + } + + public enum MOUSE_INPUT : int { + PITCH_MOUSE = KeyCode.Mouse1, + YAW_MOUSE = KeyCode.Mouse1 + } + + #endregion + + #region Members + + public Transform TargetObject; + [Range(1f, 20f)] public float ObjectRotationSpeed = 5f; + [Range(1f, 20f)] public float CameraRotationThreshold = 0.5f; + public bool InvertCameraAxis = false; + public TOGGLE_MODE ToggleMode = TOGGLE_MODE.TARGET_CAMERA; + + private Transform g_Camera; + + private Space g_SpaceTarget = Space.World; + + private Vector2 g_LastMousePosition; + + #endregion + + #region Unity_Functions + + public void Start() { + g_Camera = Camera.main.transform; + } + + // Update is called once per frame + void Update () { + + float speedMod = Input.GetKey((KeyCode)KEYBOARD_INPUT.SPEED_MODIFIER) ? 2f : 1f; + + if(Input.GetKeyDown((KeyCode)KEYBOARD_INPUT.SPACE_MODIFIER)) { + if (g_SpaceTarget == Space.World) { + g_SpaceTarget = Space.Self; + Debug.Log("Space::Self"); + } else { + g_SpaceTarget = Space.World; + Debug.Log("Space::World"); + } + } + + if (Input.GetKeyDown( (KeyCode) TOGGLE_MODE.TARGET_OBJECT) ) { + ToggleMode = TOGGLE_MODE.TARGET_OBJECT; + Debug.Log("Object Selected"); + } else if (Input.GetKeyDown((KeyCode)TOGGLE_MODE.TARGET_CAMERA)) { + ToggleMode = TOGGLE_MODE.TARGET_CAMERA; + Debug.Log("Camera Selected"); + } + + // Hanlde Mouse + + foreach(MOUSE_INPUT mi in Enum.GetValues(typeof(MOUSE_INPUT))) { + if(Input.GetKey((KeyCode)mi)) { + float horDelta = g_LastMousePosition.x - Input.mousePosition.x; + float verDelta = g_LastMousePosition.y - Input.mousePosition.y; + if (Mathf.Abs(horDelta) > CameraRotationThreshold) { + int horDir = horDelta > 0 ? (InvertCameraAxis ? 1 : -1) : (InvertCameraAxis ? -1 : 1); + g_Camera.Rotate(Vector3.up, horDir * speedMod * ObjectRotationSpeed * Time.deltaTime, Space.World); + } + if (Mathf.Abs(verDelta) > CameraRotationThreshold) { + int verDir = verDelta > 0 ? (InvertCameraAxis ? -1 : 1) : (InvertCameraAxis ? 1 : -1); + g_Camera.Rotate(g_Camera.right, verDir * speedMod * ObjectRotationSpeed * Time.deltaTime, Space.World); + } + + } + } + + + // Handle Keyboard + + if(ToggleMode == TOGGLE_MODE.TARGET_OBJECT && TargetObject != null) { + foreach (KEYBOARD_INPUT val in Enum.GetValues(typeof(KEYBOARD_INPUT))) { + if(Input.GetKey((KeyCode) val)) { + switch(val) { + case KEYBOARD_INPUT.YAW_POS: + switch(g_SpaceTarget) { + case Space.World: + TargetObject.RotateAround(Vector3.zero, Vector3.up, speedMod * ObjectRotationSpeed * Time.deltaTime); + break; + case Space.Self: + TargetObject.Rotate(TargetObject.up, speedMod * ObjectRotationSpeed * Time.deltaTime, Space.World); + break; + } + break; + case KEYBOARD_INPUT.YAW_NEG: + switch (g_SpaceTarget) { + case Space.World: + TargetObject.RotateAround(Vector3.zero, Vector3.up, -(speedMod * ObjectRotationSpeed * Time.deltaTime)); + break; + case Space.Self: + TargetObject.Rotate(TargetObject.up, -(speedMod * ObjectRotationSpeed * Time.deltaTime), Space.World); + break; + } + break; + case KEYBOARD_INPUT.PITCH_POS: + switch (g_SpaceTarget) { + case Space.World: + TargetObject.RotateAround(Vector3.zero, Vector3.right, speedMod * ObjectRotationSpeed * Time.deltaTime); + break; + case Space.Self: + TargetObject.Rotate(TargetObject.right, speedMod * ObjectRotationSpeed * Time.deltaTime, Space.World); + break; + } + break; + case KEYBOARD_INPUT.PITCH_NEG: + switch (g_SpaceTarget) { + case Space.World: + TargetObject.RotateAround(Vector3.zero, Vector3.right, -(speedMod * ObjectRotationSpeed * Time.deltaTime)); + break; + case Space.Self: + TargetObject.Rotate(TargetObject.right, -(speedMod * ObjectRotationSpeed * Time.deltaTime), Space.World); + break; + } + break; + case KEYBOARD_INPUT.ROLL_POS: + switch (g_SpaceTarget) { + case Space.World: + TargetObject.RotateAround(Vector3.zero, Vector3.forward, speedMod * ObjectRotationSpeed * Time.deltaTime); + break; + case Space.Self: + TargetObject.Rotate(TargetObject.forward, speedMod * ObjectRotationSpeed * Time.deltaTime, Space.World); + break; + } + break; + case KEYBOARD_INPUT.ROLL_NEG: + switch (g_SpaceTarget) { + case Space.World: + TargetObject.RotateAround(Vector3.zero, Vector3.forward, -(speedMod * ObjectRotationSpeed * Time.deltaTime)); + break; + case Space.Self: + TargetObject.Rotate(TargetObject.forward, -(speedMod * ObjectRotationSpeed * Time.deltaTime), Space.World); + break; + } + break; + } + } + + } + } else if (ToggleMode == TOGGLE_MODE.TARGET_CAMERA && g_Camera != null) { + foreach (KEYBOARD_INPUT val in Enum.GetValues(typeof(KEYBOARD_INPUT))) { + if(Input.GetKey((KeyCode) val)) { + switch(val) { + case KEYBOARD_INPUT.FORWARD: + g_Camera.position += (g_Camera.forward * Time.deltaTime * speedMod); + break; + case KEYBOARD_INPUT.BACKWARDS: + g_Camera.position -= (g_Camera.forward * Time.deltaTime * speedMod); + break; + case KEYBOARD_INPUT.LEFT_STRAFE: + g_Camera.position -= (g_Camera.right * Time.deltaTime * speedMod); + break; + case KEYBOARD_INPUT.RIGHT_STRAFE: + g_Camera.position += (g_Camera.right * Time.deltaTime * speedMod); + break; + case KEYBOARD_INPUT.LEFT_ROTATE: + g_Camera.Rotate(Vector3.up, -(speedMod * Time.deltaTime * ObjectRotationSpeed), Space.World); + break; + case KEYBOARD_INPUT.RIGHT_ROTATE: + g_Camera.Rotate(Vector3.up, speedMod * Time.deltaTime * ObjectRotationSpeed, Space.World); + break; + } + } + } + } + + // DEBUG INFO + if (TargetObject != null) { + if(g_SpaceTarget == Space.World) { + Debug.DrawRay(TargetObject.position, Vector3.forward, Color.blue); + Debug.DrawRay(TargetObject.position, Vector3.right, Color.red); + Debug.DrawRay(TargetObject.position, Vector3.up, Color.green); + } else { + Debug.DrawRay(TargetObject.position, TargetObject.forward, Color.blue); + Debug.DrawRay(TargetObject.position, TargetObject.right, Color.red); + Debug.DrawRay(TargetObject.position, TargetObject.up, Color.green); + } + } + + g_LastMousePosition = new Vector2(Input.mousePosition.x, Input.mousePosition.y); + + } + + #endregion + + +} diff --git a/Assets/Scripts/MainController.cs.meta b/Assets/Scripts/MainController.cs.meta new file mode 100644 index 00000000..9047b2a8 --- /dev/null +++ b/Assets/Scripts/MainController.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 772505711fd70bf41909b6b80ff65221 +timeCreated: 1505090841 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/rotator.cs b/Assets/Scripts/rotator.cs new file mode 100644 index 00000000..3914a336 --- /dev/null +++ b/Assets/Scripts/rotator.cs @@ -0,0 +1,22 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class rotator : MonoBehaviour { + public float degree = 1; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + // Rotate the object around its local X axis at 1 degree per second + //transform.Rotate(Time.deltaTime, 0, 0); + + // ...also rotate around the World's Y axis + transform.Rotate(0, Time.deltaTime*degree, 0, Space.World); + } +} diff --git a/Assets/Scripts/rotator.cs.meta b/Assets/Scripts/rotator.cs.meta new file mode 100644 index 00000000..697a6fa0 --- /dev/null +++ b/Assets/Scripts/rotator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2fff452962e841546b7949099acffb56 +timeCreated: 1507075679 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Standard Assets/Environment/Water (Basic)/Shaders/FXWaterBasic.shader b/Assets/Standard Assets/Environment/Water (Basic)/Shaders/FXWaterBasic.shader index 78576de9..87761b63 100644 --- a/Assets/Standard Assets/Environment/Water (Basic)/Shaders/FXWaterBasic.shader +++ b/Assets/Standard Assets/Environment/Water (Basic)/Shaders/FXWaterBasic.shader @@ -1,3 +1,5 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + // Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' Shader "FX/Water (Basic)" { @@ -36,7 +38,7 @@ v2f vert(appdata v) v2f o; float4 s; - o.pos = mul (UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos (v.vertex); // scroll bump waves float4 temp; diff --git a/Assets/Standard Assets/Environment/Water/Water/Shaders/FXWaterPro.shader b/Assets/Standard Assets/Environment/Water/Water/Shaders/FXWaterPro.shader index 3eeba47d..313a613a 100644 --- a/Assets/Standard Assets/Environment/Water/Water/Shaders/FXWaterPro.shader +++ b/Assets/Standard Assets/Environment/Water/Water/Shaders/FXWaterPro.shader @@ -1,3 +1,5 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + // Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' Shader "FX/Water" { @@ -72,7 +74,7 @@ struct v2f { v2f vert(appdata v) { v2f o; - o.pos = mul (UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos (v.vertex); // scroll bump waves diff --git a/Assets/Standard Assets/Environment/Water/Water4/Shaders/FXWater4Advanced.shader b/Assets/Standard Assets/Environment/Water/Water4/Shaders/FXWater4Advanced.shader index 8fd069b8..20077168 100644 --- a/Assets/Standard Assets/Environment/Water/Water4/Shaders/FXWater4Advanced.shader +++ b/Assets/Standard Assets/Environment/Water/Water4/Shaders/FXWater4Advanced.shader @@ -1,3 +1,5 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + // Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' Shader "FX/Water4" { @@ -156,7 +158,7 @@ CGINCLUDE o.viewInterpolator.xyz = worldSpaceVertex - _WorldSpaceCameraPos; - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos(v.vertex); ComputeScreenAndGrabPassPos(o.pos, o.screenPos, o.grabPassPos); @@ -260,7 +262,7 @@ CGINCLUDE o.viewInterpolator.xyz = worldSpaceVertex - _WorldSpaceCameraPos; - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos(v.vertex); o.screenPos = ComputeScreenPos(o.pos); @@ -330,7 +332,7 @@ CGINCLUDE o.viewInterpolator.xyz = worldSpaceVertex-_WorldSpaceCameraPos; - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos(v.vertex); o.viewInterpolator.w = 1;//GetDistanceFadeout(ComputeScreenPos(o.pos).w, DISTANCE_SCALE); diff --git a/Assets/Standard Assets/Environment/Water/Water4/Shaders/FXWater4Simple.shader b/Assets/Standard Assets/Environment/Water/Water4/Shaders/FXWater4Simple.shader index c90c848b..d8cfc342 100644 --- a/Assets/Standard Assets/Environment/Water/Water4/Shaders/FXWater4Simple.shader +++ b/Assets/Standard Assets/Environment/Water/Water4/Shaders/FXWater4Simple.shader @@ -1,3 +1,5 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + // Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' Shader "FX/SimpleWater4" { @@ -150,7 +152,7 @@ CGINCLUDE o.viewInterpolator.xyz = worldSpaceVertex - _WorldSpaceCameraPos; - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos(v.vertex); ComputeScreenAndGrabPassPos(o.pos, o.screenPos, o.grabPassPos); @@ -248,7 +250,7 @@ CGINCLUDE o.viewInterpolator.xyz = worldSpaceVertex - _WorldSpaceCameraPos; - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos(v.vertex); o.screenPos = ComputeScreenPos(o.pos); @@ -317,7 +319,7 @@ CGINCLUDE o.viewInterpolator.xyz = worldSpaceVertex-_WorldSpaceCameraPos; - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.pos = UnityObjectToClipPos(v.vertex); UNITY_TRANSFER_FOG(o,o.pos); return o; diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index c88c6223..f606cb48 100644 Binary files a/ProjectSettings/ProjectSettings.asset and b/ProjectSettings/ProjectSettings.asset differ diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index edb703f3..a211ccd3 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1 @@ -m_EditorVersion: 5.4.0f3 -m_StandardAssetsVersion: 0 +m_EditorVersion: 2017.1.1f1