diff --git a/Assets/fuck.meta b/Assets/fuck.meta new file mode 100644 index 0000000..7e0e3de --- /dev/null +++ b/Assets/fuck.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e92fd0358e264504386784afaeefb0c2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/fuck/NewAssembly.asmdef b/Assets/fuck/NewAssembly.asmdef new file mode 100644 index 0000000..3331781 --- /dev/null +++ b/Assets/fuck/NewAssembly.asmdef @@ -0,0 +1,3 @@ +{ + "name": "NewAssembly" +} diff --git a/Assets/fuck/NewAssembly.asmdef.meta b/Assets/fuck/NewAssembly.asmdef.meta new file mode 100644 index 0000000..d178a22 --- /dev/null +++ b/Assets/fuck/NewAssembly.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b04131ef45270a5c495fcdf846f0804a +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/fuck/Screenshot.cs b/Assets/fuck/Screenshot.cs new file mode 100644 index 0000000..ed58a5a --- /dev/null +++ b/Assets/fuck/Screenshot.cs @@ -0,0 +1,32 @@ +using System.IO; +using UnityEngine; + +public class Screenshot : MonoBehaviour +{ + public bool takeScreenshot; + public string filename = "unity_screenshot.png"; + + void Start() + { + if (takeScreenshot) + { + Camera cam = GetComponent(); + + RenderTexture currentRT = RenderTexture.active; + RenderTexture.active = cam.targetTexture; + + cam.Render(); + + Texture2D Image = new Texture2D(cam.targetTexture.width, cam.targetTexture.height); + Image.ReadPixels(new Rect(0, 0, cam.targetTexture.width, cam.targetTexture.height), 0, 0); + Image.Apply(); + RenderTexture.active = currentRT; + + var Bytes = Image.EncodeToPNG(); + Destroy(Image); + + File.WriteAllBytes("/home/crispypin/pictures/" + filename, Bytes); + } + } + +} diff --git a/Assets/fuck/Screenshot.cs.meta b/Assets/fuck/Screenshot.cs.meta new file mode 100644 index 0000000..9502fc9 --- /dev/null +++ b/Assets/fuck/Screenshot.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4733ef1d4170fa3b383a26e80d5538e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/sunset_box/lock.anim b/Assets/sunset_box/lock.anim index 206a758..9d2c314 100644 --- a/Assets/sunset_box/lock.anim +++ b/Assets/sunset_box/lock.anim @@ -17,34 +17,6 @@ AnimationClip: m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 0.016666668 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_Enabled - path: sunset_box - classID: 65 - script: {fileID: 0} - curve: serializedVersion: 2 m_Curve: @@ -101,6 +73,34 @@ AnimationClip: path: UnlockButton classID: 23 script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 65 + script: {fileID: 0} m_PPtrCurves: [] m_SampleRate: 60 m_WrapMode: 0 @@ -109,13 +109,6 @@ AnimationClip: m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: - - serializedVersion: 2 - path: 1825373810 - attribute: 3305885265 - script: {fileID: 0} - typeID: 65 - customType: 0 - isPPtrCurve: 0 - serializedVersion: 2 path: 3457370921 attribute: 3305885265 @@ -130,6 +123,13 @@ AnimationClip: typeID: 23 customType: 0 isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 3305885265 + script: {fileID: 0} + typeID: 65 + customType: 0 + isPPtrCurve: 0 pptrCurveMapping: [] m_AnimationClipSettings: serializedVersion: 2 @@ -152,34 +152,6 @@ AnimationClip: m_HeightFromFeet: 0 m_Mirror: 0 m_EditorCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 0.016666668 - value: 0 - inSlope: Infinity - outSlope: Infinity - tangentMode: 103 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_Enabled - path: sunset_box - classID: 65 - script: {fileID: 0} - curve: serializedVersion: 2 m_Curve: @@ -236,6 +208,34 @@ AnimationClip: path: UnlockButton classID: 23 script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.016666668 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Enabled + path: + classID: 65 + script: {fileID: 0} m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 diff --git a/Assets/sunset_box/render_texture.renderTexture b/Assets/sunset_box/render_texture.renderTexture new file mode 100644 index 0000000..2d4ad8a --- /dev/null +++ b/Assets/sunset_box/render_texture.renderTexture @@ -0,0 +1,37 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: render_texture + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + serializedVersion: 3 + m_Width: 3840 + m_Height: 2160 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthFormat: 2 + m_ColorFormat: 4 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 1 + m_UseDynamicScale: 0 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 2 + m_VolumeDepth: 1 diff --git a/Assets/sunset_box/render_texture.renderTexture.meta b/Assets/sunset_box/render_texture.renderTexture.meta new file mode 100755 index 0000000..1403c7c --- /dev/null +++ b/Assets/sunset_box/render_texture.renderTexture.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3df80b8b4132800b79325d3f3d7bf8bd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/sunset_box/sunset_box.unity b/Assets/sunset_box/sunset_box.unity index 7d38ed5..fd1ed0a 100644 --- a/Assets/sunset_box/sunset_box.unity +++ b/Assets/sunset_box/sunset_box.unity @@ -135,6 +135,7 @@ GameObject: - component: {fileID: 733733046} - component: {fileID: 733733051} - component: {fileID: 733733050} + - component: {fileID: 733733052} m_Layer: 0 m_Name: SunsetBox m_TagString: Untagged @@ -300,6 +301,19 @@ MonoBehaviour: onExitSeat: m_PersistentCalls: m_Calls: [] +--- !u!65 &733733052 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 733733045} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1.4, y: 1.4, z: 1.4} + m_Center: {x: 0, y: 0.7, z: 0} --- !u!1 &1702728164 GameObject: m_ObjectHideFlags: 0 @@ -555,7 +569,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4733ef1d4170fa3b383a26e80d5538e4, type: 3} m_Name: m_EditorClassIdentifier: - FileCounter: 0 + takeScreenshot: 0 + filename: unity_screenshot.png --- !u!1001 &2104997433 PrefabInstance: m_ObjectHideFlags: 0 @@ -581,7 +596,7 @@ PrefabInstance: - target: {fileID: -8679921383154817045, guid: 5009e49fafd33ed0e980b53b1f9e954d, type: 3} propertyPath: m_LocalPosition.z - value: -0.232 + value: 0 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 5009e49fafd33ed0e980b53b1f9e954d, type: 3} @@ -640,25 +655,6 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 5009e49fafd33ed0e980b53b1f9e954d, type: 3} ---- !u!1 &2104997434 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 5009e49fafd33ed0e980b53b1f9e954d, - type: 3} - m_PrefabInstance: {fileID: 2104997433} - m_PrefabAsset: {fileID: 0} ---- !u!65 &2104997435 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2104997434} - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1.5, y: 1.5000004, z: 1.5000004} - m_Center: {x: 0, y: 0, z: 0.75} --- !u!4 &2104997436 stripped Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 5009e49fafd33ed0e980b53b1f9e954d, diff --git a/Assets/sunset_box/sunset_box_anim.controller b/Assets/sunset_box/sunset_box_anim.controller index ae21ef7..2d6689e 100644 --- a/Assets/sunset_box/sunset_box_anim.controller +++ b/Assets/sunset_box/sunset_box_anim.controller @@ -41,7 +41,7 @@ AnimatorStateMachine: m_Position: {x: 300, y: 40, z: 0} - serializedVersion: 1 m_State: {fileID: -1974818867188680489} - m_Position: {x: 300, y: 110, z: 0} + m_Position: {x: 300, y: 140, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] @@ -112,7 +112,7 @@ AnimatorStateTransition: m_PrefabAsset: {fileID: 0} m_Name: m_Conditions: - - m_ConditionMode: 3 + - m_ConditionMode: 4 m_ConditionEvent: Locked m_EventTreshold: 1 m_DstStateMachine: {fileID: 0} @@ -143,7 +143,7 @@ AnimatorController: m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer diff --git a/Assets/sunset_box/sunset_env_dynamic.shader b/Assets/sunset_box/sunset_env_dynamic.shader index 01cb792..cd9c61a 100644 --- a/Assets/sunset_box/sunset_env_dynamic.shader +++ b/Assets/sunset_box/sunset_env_dynamic.shader @@ -118,6 +118,7 @@ fixed4 frag(v2f i) : SV_Target { float water_mod = 0.0; + float water_reflection = 0.0; float3 real_dir = normalize(i.hit_pos - i.cam_pos); float3 dir = real_dir; @@ -135,6 +136,7 @@ dir = reflect(dir, water_normal); water_mod = dot(dir, water_normal); + water_reflection = 1.0; } float y = abs(real_y); dir.y = abs(dir.y); @@ -190,6 +192,12 @@ col = lerp(col, _SunCol, sun_amount); col = lerp(col, _WaterCol, water_mod); + + /// shiny water + // float view_perpendicular = 1 - abs(dot(dir, water_normal)); + // float view_perpendicular = 1 - abs(dot(dir, water_normal)); + // water_reflection = _SunCol * pow(view_perpendicular, 40); + // col += water_reflection *; return col; } ENDCG