Minor - Add Assets And Support Dual Screen
This commit is contained in:
9
Assets/MobileDepthWater/Animations.meta
Normal file
9
Assets/MobileDepthWater/Animations.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ce166302ef804a489853c878c5eaf31
|
||||
folderAsset: yes
|
||||
timeCreated: 1493245518
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
101
Assets/MobileDepthWater/Animations/Animations.controller
Normal file
101
Assets/MobileDepthWater/Animations/Animations.controller
Normal file
@@ -0,0 +1,101 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Animations
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 1107000012612231004}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1102 &1102000010528296740
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: New State
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 0}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1102 &1102000012886338688
|
||||
AnimatorState:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Boat
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
m_WriteDefaultValues: 1
|
||||
m_Mirror: 0
|
||||
m_SpeedParameterActive: 0
|
||||
m_MirrorParameterActive: 0
|
||||
m_CycleOffsetParameterActive: 0
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: a084dd07439005c4887db23db1e72573, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1107 &1107000012612231004
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102000010528296740}
|
||||
m_Position: {x: 276, y: 120, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102000012886338688}
|
||||
m_Position: {x: 276, y: 60, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 1102000010528296740}
|
||||
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f893a0488ac1b2c429e4b91d125d3e43
|
||||
timeCreated: 1493902673
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Animations/Animations.controller
|
||||
uploadId: 179707
|
||||
1057
Assets/MobileDepthWater/Animations/Boat.anim
Normal file
1057
Assets/MobileDepthWater/Animations/Boat.anim
Normal file
File diff suppressed because it is too large
Load Diff
15
Assets/MobileDepthWater/Animations/Boat.anim.meta
Normal file
15
Assets/MobileDepthWater/Animations/Boat.anim.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a084dd07439005c4887db23db1e72573
|
||||
timeCreated: 1493902678
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Animations/Boat.anim
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Materials.meta
Normal file
9
Assets/MobileDepthWater/Materials.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd1ef76f7c4ba1149a3ec2b62ed1c6f4
|
||||
folderAsset: yes
|
||||
timeCreated: 1493133394
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
139
Assets/MobileDepthWater/Materials/BoatTop.mat
Normal file
139
Assets/MobileDepthWater/Materials/BoatTop.mat
Normal file
@@ -0,0 +1,139 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-5004011092060793795
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: BoatTop
|
||||
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossinessSource: 0
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Shininess: 0
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessSource: 1
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecSource: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.64705884, g: 0.49533468, b: 0, a: 1}
|
||||
- _Color: {r: 0.64705884, g: 0.49533468, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
15
Assets/MobileDepthWater/Materials/BoatTop.mat.meta
Normal file
15
Assets/MobileDepthWater/Materials/BoatTop.mat.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 261c4caf1e4fb3841b93e6f84a3de745
|
||||
timeCreated: 1493900991
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Materials/BoatTop.mat
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Materials/LakeIsland.meta
Normal file
9
Assets/MobileDepthWater/Materials/LakeIsland.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de98537ebc54b5c4f978e9f5b25f35ef
|
||||
folderAsset: yes
|
||||
timeCreated: 1493603541
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
104
Assets/MobileDepthWater/Materials/LakeIsland/WaterGrass.mat
Normal file
104
Assets/MobileDepthWater/Materials/LakeIsland/WaterGrass.mat
Normal file
@@ -0,0 +1,104 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: WaterGrass
|
||||
m_Shader: {fileID: 4800000, guid: 43be516172fe7624da4ca48a036caaf5, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _EMISSION
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DistTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 7fcf40529df2320439b16b2e2037f499, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _WaterTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BorderWidth: 0
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _TextureVisibility: 1
|
||||
- _UVSec: 0
|
||||
- _WaterDeep: 0
|
||||
- _WaterDepth: 0
|
||||
- _WaterHeight: 0
|
||||
- _WaterMinAlpha: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BorderColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _DistTiling: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _MoveDirection: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Tiling: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _WaterColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 606d0665b57392b48b35f760c205dc21
|
||||
timeCreated: 1493901011
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Materials/LakeIsland/WaterGrass.mat
|
||||
uploadId: 179707
|
||||
104
Assets/MobileDepthWater/Materials/LakeIsland/WaterLake.mat
Normal file
104
Assets/MobileDepthWater/Materials/LakeIsland/WaterLake.mat
Normal file
@@ -0,0 +1,104 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: WaterLake
|
||||
m_Shader: {fileID: 4800000, guid: e7e85ac45d06bba48b3f9c38ef023f7b, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _EMISSION
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DistTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 7fcf40529df2320439b16b2e2037f499, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _WaterTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BorderWidth: 0
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _TextureVisibility: 1
|
||||
- _UVSec: 0
|
||||
- _WaterDeep: 0
|
||||
- _WaterDepth: 0
|
||||
- _WaterHeight: 0
|
||||
- _WaterMinAlpha: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BorderColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _DistTiling: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _MoveDirection: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Tiling: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _WaterColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9821c1b0463afc345b0bbae9ddc158d3
|
||||
timeCreated: 1493901011
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Materials/LakeIsland/WaterLake.mat
|
||||
uploadId: 179707
|
||||
139
Assets/MobileDepthWater/Materials/LegacyDiffuse.mat
Normal file
139
Assets/MobileDepthWater/Materials/LegacyDiffuse.mat
Normal file
@@ -0,0 +1,139 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: LegacyDiffuse
|
||||
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _EMISSION
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 7fcf40529df2320439b16b2e2037f499, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 7fcf40529df2320439b16b2e2037f499, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossinessSource: 0
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Shininess: 0
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessSource: 1
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecSource: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &4417350807112484949
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
15
Assets/MobileDepthWater/Materials/LegacyDiffuse.mat.meta
Normal file
15
Assets/MobileDepthWater/Materials/LegacyDiffuse.mat.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 854929c6a90467543b32b4c44a6fdb3b
|
||||
timeCreated: 1493900991
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Materials/LegacyDiffuse.mat
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Materials/Skybox.meta
Normal file
9
Assets/MobileDepthWater/Materials/Skybox.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c78bf29598350e24c8ed7ae1f5311439
|
||||
folderAsset: yes
|
||||
timeCreated: 1461167480
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
112
Assets/MobileDepthWater/Materials/Skybox/Skybox.mat
Normal file
112
Assets/MobileDepthWater/Materials/Skybox/Skybox.mat
Normal file
@@ -0,0 +1,112 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Skybox
|
||||
m_Shader: {fileID: 104, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _EMISSION
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BackTex:
|
||||
m_Texture: {fileID: 2800000, guid: f274b473c27dfa8439f284c28094acc2, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DownTex:
|
||||
m_Texture: {fileID: 2800000, guid: 2925179f4a14f8e49b5e0ad1a49b08f9, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _FrontTex:
|
||||
m_Texture: {fileID: 2800000, guid: f274b473c27dfa8439f284c28094acc2, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _LeftTex:
|
||||
m_Texture: {fileID: 2800000, guid: f274b473c27dfa8439f284c28094acc2, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _RightTex:
|
||||
m_Texture: {fileID: 2800000, guid: f274b473c27dfa8439f284c28094acc2, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _UpTex:
|
||||
m_Texture: {fileID: 2800000, guid: 2925179f4a14f8e49b5e0ad1a49b08f9, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _Exposure: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Rotation: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
15
Assets/MobileDepthWater/Materials/Skybox/Skybox.mat.meta
Normal file
15
Assets/MobileDepthWater/Materials/Skybox/Skybox.mat.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e888bdf6b22fcc242a525c402432772f
|
||||
timeCreated: 1493900713
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Materials/Skybox/Skybox.mat
|
||||
uploadId: 179707
|
||||
BIN
Assets/MobileDepthWater/Materials/Skybox/sky_DN.psd
Normal file
BIN
Assets/MobileDepthWater/Materials/Skybox/sky_DN.psd
Normal file
Binary file not shown.
66
Assets/MobileDepthWater/Materials/Skybox/sky_DN.psd.meta
Normal file
66
Assets/MobileDepthWater/Materials/Skybox/sky_DN.psd.meta
Normal file
@@ -0,0 +1,66 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2925179f4a14f8e49b5e0ad1a49b08f9
|
||||
timeCreated: 1493657589
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 5
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Materials/Skybox/sky_DN.psd
|
||||
uploadId: 179707
|
||||
BIN
Assets/MobileDepthWater/Materials/Skybox/sky_FR.psd
Normal file
BIN
Assets/MobileDepthWater/Materials/Skybox/sky_FR.psd
Normal file
Binary file not shown.
66
Assets/MobileDepthWater/Materials/Skybox/sky_FR.psd.meta
Normal file
66
Assets/MobileDepthWater/Materials/Skybox/sky_FR.psd.meta
Normal file
@@ -0,0 +1,66 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f274b473c27dfa8439f284c28094acc2
|
||||
timeCreated: 1493658636
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 5
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Materials/Skybox/sky_FR.psd
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Materials/Water.meta
Normal file
9
Assets/MobileDepthWater/Materials/Water.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f53895c34d2cc684a969403ff375e029
|
||||
folderAsset: yes
|
||||
timeCreated: 1493302843
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
99
Assets/MobileDepthWater/Materials/Water/Water.mat
Normal file
99
Assets/MobileDepthWater/Materials/Water/Water.mat
Normal file
@@ -0,0 +1,99 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Water
|
||||
m_Shader: {fileID: 4800000, guid: 12a8cc6f8fa05ab49a845b58de64c0ee, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _EMISSION
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DistTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _WaterTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _TextureVisibility: 1
|
||||
- _UVSec: 0
|
||||
- _WaterHeight: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _DistTiling: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _MoveDirection: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Tiling: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _WaterColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
15
Assets/MobileDepthWater/Materials/Water/Water.mat.meta
Normal file
15
Assets/MobileDepthWater/Materials/Water/Water.mat.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbdc3364420d0b24999bc03774829c53
|
||||
timeCreated: 1493900761
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Materials/Water/Water.mat
|
||||
uploadId: 179707
|
||||
104
Assets/MobileDepthWater/Materials/Water/WaterBoat.mat
Normal file
104
Assets/MobileDepthWater/Materials/Water/WaterBoat.mat
Normal file
@@ -0,0 +1,104 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: WaterBoat
|
||||
m_Shader: {fileID: 4800000, guid: fb270c1e5be780e46b05d4a023cd7e73, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _EMISSION
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DistTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _WaterTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BorderWidth: 0
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _TextureVisibility: 1
|
||||
- _UVSec: 0
|
||||
- _WaterDeep: 0
|
||||
- _WaterDepth: 0
|
||||
- _WaterHeight: 0
|
||||
- _WaterMinAlpha: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BorderColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 0.64705884, g: 0.49411765, b: 0, a: 1}
|
||||
- _DistTiling: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _MoveDirection: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Tiling: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _WaterColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
15
Assets/MobileDepthWater/Materials/Water/WaterBoat.mat.meta
Normal file
15
Assets/MobileDepthWater/Materials/Water/WaterBoat.mat.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92cff562ef8dfa543a3e18ae284be2e1
|
||||
timeCreated: 1493900917
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Materials/Water/WaterBoat.mat
|
||||
uploadId: 179707
|
||||
104
Assets/MobileDepthWater/Materials/Water/WaterGround.mat
Normal file
104
Assets/MobileDepthWater/Materials/Water/WaterGround.mat
Normal file
@@ -0,0 +1,104 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: WaterGround
|
||||
m_Shader: {fileID: 4800000, guid: e7e85ac45d06bba48b3f9c38ef023f7b, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _EMISSION
|
||||
m_LightmapFlags: 1
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DistTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 7fcf40529df2320439b16b2e2037f499, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _WaterTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BorderWidth: 0
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _TextureVisibility: 1
|
||||
- _UVSec: 0
|
||||
- _WaterDeep: 0
|
||||
- _WaterDepth: 0
|
||||
- _WaterHeight: 0
|
||||
- _WaterMinAlpha: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BorderColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _DistTiling: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _MoveDirection: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Tiling: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _WaterColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
15
Assets/MobileDepthWater/Materials/Water/WaterGround.mat.meta
Normal file
15
Assets/MobileDepthWater/Materials/Water/WaterGround.mat.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16d37c33eb1f38e4fb1cf72191e9ef03
|
||||
timeCreated: 1493900917
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Materials/Water/WaterGround.mat
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Models.meta
Normal file
9
Assets/MobileDepthWater/Models.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43d93beca960ca042b2fd8e0a67a7b78
|
||||
folderAsset: yes
|
||||
timeCreated: 1493133385
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/MobileDepthWater/Models/Boat.fbx
Normal file
BIN
Assets/MobileDepthWater/Models/Boat.fbx
Normal file
Binary file not shown.
95
Assets/MobileDepthWater/Models/Boat.fbx.meta
Normal file
95
Assets/MobileDepthWater/Models/Boat.fbx.meta
Normal file
@@ -0,0 +1,95 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5316b3783210d0642b67f41bff1e2c51
|
||||
timeCreated: 1493673947
|
||||
licenseType: Store
|
||||
ModelImporter:
|
||||
serializedVersion: 19
|
||||
fileIDToRecycleName:
|
||||
100000: //RootNode
|
||||
100002: Bottom
|
||||
100004: Sits
|
||||
100006: Top
|
||||
400000: //RootNode
|
||||
400002: Bottom
|
||||
400004: Sits
|
||||
400006: Top
|
||||
2300000: Bottom
|
||||
2300002: Sits
|
||||
2300004: Top
|
||||
3300000: Bottom
|
||||
3300002: Sits
|
||||
3300004: Top
|
||||
4300000: Bottom
|
||||
4300002: Sits
|
||||
4300004: Top
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importBlendShapes: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Models/Boat.fbx
|
||||
uploadId: 179707
|
||||
BIN
Assets/MobileDepthWater/Models/Bush.fbx
Normal file
BIN
Assets/MobileDepthWater/Models/Bush.fbx
Normal file
Binary file not shown.
83
Assets/MobileDepthWater/Models/Bush.fbx.meta
Normal file
83
Assets/MobileDepthWater/Models/Bush.fbx.meta
Normal file
@@ -0,0 +1,83 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 535210f1f9844ba4ab27b9972762c159
|
||||
timeCreated: 1493673947
|
||||
licenseType: Store
|
||||
ModelImporter:
|
||||
serializedVersion: 19
|
||||
fileIDToRecycleName:
|
||||
100000: //RootNode
|
||||
400000: //RootNode
|
||||
2300000: //RootNode
|
||||
3300000: //RootNode
|
||||
4300000: Plane.000
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importBlendShapes: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 1
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Models/Bush.fbx
|
||||
uploadId: 179707
|
||||
BIN
Assets/MobileDepthWater/Models/Island.fbx
Normal file
BIN
Assets/MobileDepthWater/Models/Island.fbx
Normal file
Binary file not shown.
90
Assets/MobileDepthWater/Models/Island.fbx.meta
Normal file
90
Assets/MobileDepthWater/Models/Island.fbx.meta
Normal file
@@ -0,0 +1,90 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 371d3425353fbd74f927b386d74d4eff
|
||||
timeCreated: 1493673947
|
||||
licenseType: Store
|
||||
ModelImporter:
|
||||
serializedVersion: 19
|
||||
fileIDToRecycleName:
|
||||
100000: Bottom
|
||||
100002: //RootNode
|
||||
100004: Top
|
||||
400000: Bottom
|
||||
400002: //RootNode
|
||||
400004: Top
|
||||
2300000: Bottom
|
||||
2300002: Top
|
||||
3300000: Bottom
|
||||
3300002: Top
|
||||
4300000: Top
|
||||
4300002: Bottom
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importBlendShapes: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 1
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Models/Island.fbx
|
||||
uploadId: 179707
|
||||
BIN
Assets/MobileDepthWater/Models/LakeIsland.fbx
Normal file
BIN
Assets/MobileDepthWater/Models/LakeIsland.fbx
Normal file
Binary file not shown.
95
Assets/MobileDepthWater/Models/LakeIsland.fbx.meta
Normal file
95
Assets/MobileDepthWater/Models/LakeIsland.fbx.meta
Normal file
@@ -0,0 +1,95 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b690919169dac9349ac86dd59893d16d
|
||||
timeCreated: 1493673874
|
||||
licenseType: Store
|
||||
ModelImporter:
|
||||
serializedVersion: 19
|
||||
fileIDToRecycleName:
|
||||
100000: Bottom
|
||||
100002: //RootNode
|
||||
100004: Top
|
||||
100006: TopWater
|
||||
400000: Bottom
|
||||
400002: //RootNode
|
||||
400004: Top
|
||||
400006: TopWater
|
||||
2300000: Bottom
|
||||
2300002: Top
|
||||
2300004: TopWater
|
||||
3300000: Bottom
|
||||
3300002: Top
|
||||
3300004: TopWater
|
||||
4300000: TopWater
|
||||
4300002: Top
|
||||
4300004: Bottom
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importBlendShapes: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 1
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Models/LakeIsland.fbx
|
||||
uploadId: 179707
|
||||
8
Assets/MobileDepthWater/Models/Materials.meta
Normal file
8
Assets/MobileDepthWater/Models/Materials.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe7a6c1614735504b9324e12aa640cf9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
137
Assets/MobileDepthWater/Models/Materials/Material.001.mat
Normal file
137
Assets/MobileDepthWater/Models/Materials/Material.001.mat
Normal file
@@ -0,0 +1,137 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.001
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.8, g: 0.8, b: 0.8, a: 1}
|
||||
- _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &6668141048191586164
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8fc2d0cb9e2222045ac32e7be098b82a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
137
Assets/MobileDepthWater/Models/Materials/No Name.mat
Normal file
137
Assets/MobileDepthWater/Models/Materials/No Name.mat
Normal file
@@ -0,0 +1,137 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: No Name
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &1930798343441178498
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec5383685c1a53144a65b0b1127182c5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/MobileDepthWater/Models/Tree.fbx
Normal file
BIN
Assets/MobileDepthWater/Models/Tree.fbx
Normal file
Binary file not shown.
94
Assets/MobileDepthWater/Models/Tree.fbx.meta
Normal file
94
Assets/MobileDepthWater/Models/Tree.fbx.meta
Normal file
@@ -0,0 +1,94 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8dfb3bdf788cbc345a338b5bd53d276b
|
||||
timeCreated: 1493673947
|
||||
licenseType: Store
|
||||
ModelImporter:
|
||||
serializedVersion: 19
|
||||
fileIDToRecycleName:
|
||||
100000: Leaves.001
|
||||
100002: //RootNode
|
||||
100004: Tree
|
||||
100006: Tree.008
|
||||
400000: Leaves.001
|
||||
400002: //RootNode
|
||||
400004: Tree
|
||||
400006: Tree.008
|
||||
2300000: Tree
|
||||
2300002: Tree.008
|
||||
2300004: //RootNode
|
||||
3300000: Tree
|
||||
3300002: Tree.008
|
||||
3300004: //RootNode
|
||||
4300000: Tree.008
|
||||
4300002: Tree
|
||||
materials:
|
||||
importMaterials: 1
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
motionNodeName:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
clipAnimations: []
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
importBlendShapes: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 1
|
||||
useFileUnits: 1
|
||||
optimizeMeshForGPU: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
importAnimation: 1
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Models/Tree.fbx
|
||||
uploadId: 179707
|
||||
BIN
Assets/MobileDepthWater/ReadMe.pdf
Normal file
BIN
Assets/MobileDepthWater/ReadMe.pdf
Normal file
Binary file not shown.
15
Assets/MobileDepthWater/ReadMe.pdf.meta
Normal file
15
Assets/MobileDepthWater/ReadMe.pdf.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c90b2af2568bef3468042bc045ce9706
|
||||
timeCreated: 1494698291
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/ReadMe.pdf
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Scenes.meta
Normal file
9
Assets/MobileDepthWater/Scenes.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2caf604f4a11e0641b289d84e1cc22c3
|
||||
folderAsset: yes
|
||||
timeCreated: 1493133370
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/MobileDepthWater/Scenes/DemoScene.meta
Normal file
9
Assets/MobileDepthWater/Scenes/DemoScene.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8979ad64b7e77f448861079de6c3553b
|
||||
folderAsset: yes
|
||||
timeCreated: 1493677375
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3696
Assets/MobileDepthWater/Scenes/DemoScene.unity
Normal file
3696
Assets/MobileDepthWater/Scenes/DemoScene.unity
Normal file
File diff suppressed because it is too large
Load Diff
15
Assets/MobileDepthWater/Scenes/DemoScene.unity.meta
Normal file
15
Assets/MobileDepthWater/Scenes/DemoScene.unity.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56af498a20d7fb14ab9dd5bbde060f9d
|
||||
timeCreated: 1461108130
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scenes/DemoScene.unity
|
||||
uploadId: 179707
|
||||
BIN
Assets/MobileDepthWater/Scenes/DemoScene/LightingData.asset
Normal file
BIN
Assets/MobileDepthWater/Scenes/DemoScene/LightingData.asset
Normal file
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4da78b5bbbc272348b342b3bbd12af5a
|
||||
timeCreated: 1493937234
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scenes/DemoScene/LightingData.asset
|
||||
uploadId: 179707
|
||||
Binary file not shown.
@@ -0,0 +1,66 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07be701ed768e8e4d8b55c26f55a556a
|
||||
timeCreated: 1493937224
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 1
|
||||
aniso: 3
|
||||
mipBias: 0
|
||||
wrapMode: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 1
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 6
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scenes/DemoScene/Lightmap-0_comp_light.exr
|
||||
uploadId: 179707
|
||||
BIN
Assets/MobileDepthWater/Scenes/DemoScene/ReflectionProbe-0.exr
Normal file
BIN
Assets/MobileDepthWater/Scenes/DemoScene/ReflectionProbe-0.exr
Normal file
Binary file not shown.
@@ -0,0 +1,67 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 591d07be441569e4cac60d1bc1f31cf3
|
||||
timeCreated: 1493937234
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName:
|
||||
8900000: generatedCubemap
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 1
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 1
|
||||
textureFormat: -1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 2
|
||||
aniso: 0
|
||||
mipBias: 0
|
||||
wrapMode: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 100
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 3
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scenes/DemoScene/ReflectionProbe-0.exr
|
||||
uploadId: 179707
|
||||
69
Assets/MobileDepthWater/Scenes/DemoSceneSettings.lighting
Normal file
69
Assets/MobileDepthWater/Scenes/DemoSceneSettings.lighting
Normal file
@@ -0,0 +1,69 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!850595691 &4890085278179872738
|
||||
LightingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DemoSceneSettings
|
||||
serializedVersion: 10
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_RealtimeEnvironmentLighting: 1
|
||||
m_BounceScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_UsingShadowmask: 0
|
||||
m_BakeBackend: 1
|
||||
m_LightmapMaxSize: 4096
|
||||
m_LightmapSizeFixed: 0
|
||||
m_UseMipmapLimits: 1
|
||||
m_BakeResolution: 40
|
||||
m_Padding: 2
|
||||
m_LightmapCompression: 0
|
||||
m_LightmapPackingMode: 1
|
||||
m_LightmapPackingMethod: 0
|
||||
m_XAtlasPackingAttempts: 16384
|
||||
m_XAtlasBruteForce: 0
|
||||
m_XAtlasBlockAlign: 0
|
||||
m_XAtlasRepackUnderutilizedLightmaps: 1
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAO: 0
|
||||
m_MixedBakeMode: 1
|
||||
m_LightmapsBakeMode: 0
|
||||
m_FilterMode: 1
|
||||
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ExportTrainingData: 0
|
||||
m_EnableWorkerProcessBaking: 1
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_RealtimeResolution: 2
|
||||
m_ForceWhiteAlbedo: 0
|
||||
m_ForceUpdates: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVREnvironmentSampleCount: 512
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_PVRBounces: 2
|
||||
m_PVRMinBounces: 2
|
||||
m_PVREnvironmentImportanceSampling: 0
|
||||
m_PVRFilteringMode: 0
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_RespectSceneVisibilityWhenBakingGI: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2853d0ba69ae114f802ec5e09fa7950
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 4890085278179872738
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/MobileDepthWater/Scripts.meta
Normal file
9
Assets/MobileDepthWater/Scripts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f666574806524845a52ec00f3473fdb
|
||||
folderAsset: yes
|
||||
timeCreated: 1493150965
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Assets/MobileDepthWater/Scripts/AnimationStarter.cs
Normal file
15
Assets/MobileDepthWater/Scripts/AnimationStarter.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Assets.MobileOptimizedWater.Scripts
|
||||
{
|
||||
using UnityEngine;
|
||||
|
||||
public class AnimationStarter : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Animator animator;
|
||||
[SerializeField] private Motion animation;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
animator.Play(animation.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/MobileDepthWater/Scripts/AnimationStarter.cs.meta
Normal file
19
Assets/MobileDepthWater/Scripts/AnimationStarter.cs.meta
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c6c94318626bb246a07b7f09604d66c
|
||||
timeCreated: 1493245613
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scripts/AnimationStarter.cs
|
||||
uploadId: 179707
|
||||
61
Assets/MobileDepthWater/Scripts/CameraDepthSlider.cs
Normal file
61
Assets/MobileDepthWater/Scripts/CameraDepthSlider.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
namespace Assets.MobileOptimizedWater.Scripts
|
||||
{
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class CameraDepthSlider : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Slider slider;
|
||||
[SerializeField] private Transform cameraTransform;
|
||||
|
||||
[Space]
|
||||
[SerializeField] private float minDistance;
|
||||
[SerializeField] private float maxDistance;
|
||||
|
||||
[Space]
|
||||
[SerializeField] private float scrollDelta;
|
||||
[SerializeField] private float scrollSpeed;
|
||||
|
||||
private Vector3 cameraDirectionToRoot;
|
||||
|
||||
private float currentScrollSpeed;
|
||||
private float currentValue;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
cameraDirectionToRoot = cameraTransform.localPosition.normalized;
|
||||
|
||||
slider.value = 0.2f;
|
||||
OnSliderValueChanged();
|
||||
}
|
||||
|
||||
public void OnSliderValueChanged()
|
||||
{
|
||||
UpdateDepthPosition(slider.value);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public void Update()
|
||||
{
|
||||
if (Input.GetKey(KeyCode.W))
|
||||
{
|
||||
currentScrollSpeed = Mathf.Lerp(currentScrollSpeed, currentScrollSpeed + scrollDelta, Time.deltaTime * scrollSpeed);
|
||||
UpdateDepthPosition(Mathf.Lerp(currentValue, currentValue + currentScrollSpeed, Time.deltaTime * scrollSpeed));
|
||||
}
|
||||
else if (Input.GetKey(KeyCode.S))
|
||||
{
|
||||
currentScrollSpeed = Mathf.Lerp(currentScrollSpeed, currentScrollSpeed + scrollDelta, Time.deltaTime * scrollSpeed);
|
||||
UpdateDepthPosition(Mathf.Lerp(currentValue, currentValue - currentScrollSpeed, Time.deltaTime * scrollSpeed));
|
||||
}
|
||||
|
||||
currentScrollSpeed = 0f;
|
||||
}
|
||||
#endif
|
||||
|
||||
private void UpdateDepthPosition(float value)
|
||||
{
|
||||
currentValue = Mathf.Clamp(value, 0f, 1f);
|
||||
cameraTransform.localPosition = cameraDirectionToRoot * Mathf.Lerp(minDistance, maxDistance, currentValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/MobileDepthWater/Scripts/CameraDepthSlider.cs.meta
Normal file
19
Assets/MobileDepthWater/Scripts/CameraDepthSlider.cs.meta
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 163194dd3a9ff9a4f9e9e76a372f4ea5
|
||||
timeCreated: 1493329456
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scripts/CameraDepthSlider.cs
|
||||
uploadId: 179707
|
||||
17
Assets/MobileDepthWater/Scripts/CameraRotator.cs
Normal file
17
Assets/MobileDepthWater/Scripts/CameraRotator.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace Assets.MobileOptimizedWater.Scripts
|
||||
{
|
||||
using UnityEngine;
|
||||
|
||||
public class CameraRotator : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private float speed = 5f;
|
||||
|
||||
public void Update()
|
||||
{
|
||||
var angles = transform.eulerAngles;
|
||||
angles.y += Time.deltaTime * speed;
|
||||
|
||||
transform.eulerAngles = angles;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/MobileDepthWater/Scripts/CameraRotator.cs.meta
Normal file
19
Assets/MobileDepthWater/Scripts/CameraRotator.cs.meta
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a28d745c2c1c0e249aaa6117f403d94b
|
||||
timeCreated: 1493151061
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scripts/CameraRotator.cs
|
||||
uploadId: 179707
|
||||
90
Assets/MobileDepthWater/Scripts/FPSCounter.cs
Normal file
90
Assets/MobileDepthWater/Scripts/FPSCounter.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
namespace Assets.Scripts.Helpers
|
||||
{
|
||||
using UnityEngine;
|
||||
|
||||
public class FPSCounter
|
||||
{
|
||||
private const float Frequency = 0.1f;
|
||||
private const int DataSize = 100;
|
||||
|
||||
private float[] fpsData;
|
||||
private float[] deltaTimeData;
|
||||
|
||||
private float timer;
|
||||
private int index;
|
||||
|
||||
private int lastFrameCount;
|
||||
private float lastTime;
|
||||
|
||||
public FPSCounter()
|
||||
{
|
||||
index = 0;
|
||||
timer = 0f;
|
||||
|
||||
fpsData = new float[DataSize];
|
||||
deltaTimeData = new float[DataSize];
|
||||
}
|
||||
|
||||
public float Fps
|
||||
{
|
||||
get { return fpsData[Mathf.Max(index - 1, 0)]; }
|
||||
}
|
||||
|
||||
public void Update(float deltaTime)
|
||||
{
|
||||
timer += deltaTime;
|
||||
|
||||
if (timer >= Frequency)
|
||||
{
|
||||
var timeSpan = Time.realtimeSinceStartup - lastTime;
|
||||
var frameCount = Time.frameCount - lastFrameCount;
|
||||
|
||||
fpsData[index] = frameCount / timeSpan;
|
||||
deltaTimeData[index] = timer;
|
||||
|
||||
index = (index + 1) % DataSize;
|
||||
|
||||
lastFrameCount = Time.frameCount;
|
||||
lastTime = Time.realtimeSinceStartup;
|
||||
|
||||
timer = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return average fps for last N seconds.
|
||||
/// </summary>
|
||||
/// <param name="forLastSec">Last seconds for calculating.</param>
|
||||
/// <returns>Average fps for last N seconds.</returns>
|
||||
public float GetAverageFps(float forLastSec)
|
||||
{
|
||||
var fpsSum = 0f;
|
||||
var timeSum = 0f;
|
||||
|
||||
var localIndex = index - 1;
|
||||
var totalDataCount = 0;
|
||||
|
||||
while (timeSum <= forLastSec)
|
||||
{
|
||||
if (localIndex < 0)
|
||||
{
|
||||
localIndex += DataSize;
|
||||
}
|
||||
|
||||
fpsSum += fpsData[localIndex];
|
||||
timeSum += deltaTimeData[localIndex];
|
||||
|
||||
localIndex--;
|
||||
totalDataCount++;
|
||||
|
||||
if (totalDataCount == DataSize)
|
||||
{
|
||||
Debug.LogWarning("Too few data to calculate average fps for such long term.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return fpsSum / totalDataCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/MobileDepthWater/Scripts/FPSCounter.cs.meta
Normal file
19
Assets/MobileDepthWater/Scripts/FPSCounter.cs.meta
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b1c28173ea46b14d8082af87f26aa6d
|
||||
timeCreated: 1493152153
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scripts/FPSCounter.cs
|
||||
uploadId: 179707
|
||||
24
Assets/MobileDepthWater/Scripts/FPSUI.cs
Normal file
24
Assets/MobileDepthWater/Scripts/FPSUI.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace Assets.MobileOptimizedWater.Scripts
|
||||
{
|
||||
using Assets.Scripts.Helpers;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class FPSUI : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Text fpsText;
|
||||
|
||||
private FPSCounter fpsCounter;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
fpsCounter = new FPSCounter();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
fpsCounter.Update(Time.deltaTime);
|
||||
fpsText.text = "Fps: " + fpsCounter.GetAverageFps(1f).ToString("###");
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/MobileDepthWater/Scripts/FPSUI.cs.meta
Normal file
19
Assets/MobileDepthWater/Scripts/FPSUI.cs.meta
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27de325d551c70740a742a8b6544895f
|
||||
timeCreated: 1493152271
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scripts/FPSUI.cs
|
||||
uploadId: 179707
|
||||
43
Assets/MobileDepthWater/Scripts/TouchRotator.cs
Normal file
43
Assets/MobileDepthWater/Scripts/TouchRotator.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace Assets.MobileOptimizedWater.Scripts
|
||||
{
|
||||
using UnityEngine;
|
||||
|
||||
public class TouchRotator : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Transform cameraRoot;
|
||||
[SerializeField] private float speed;
|
||||
[SerializeField] private float mouseSpeed;
|
||||
|
||||
private Vector3 prevMousePos;
|
||||
|
||||
#if !UNITY_EDITOR
|
||||
public void Update()
|
||||
{
|
||||
if (Input.touchCount > 0 && Input.GetTouch(0).position.x < Screen.width * 0.9f)
|
||||
{
|
||||
var deltaPos = Input.GetTouch(0).deltaPosition;
|
||||
|
||||
var deltaRotation = new Vector3(-deltaPos.y, deltaPos.x) * Time.deltaTime * speed;
|
||||
var rotation = cameraRoot.eulerAngles + deltaRotation;
|
||||
|
||||
cameraRoot.eulerAngles = new Vector3(Mathf.Clamp(rotation.x, 0f, 90f), rotation.y);
|
||||
}
|
||||
}
|
||||
#else
|
||||
public void Update()
|
||||
{
|
||||
if (Input.GetKey(KeyCode.LeftAlt))
|
||||
{
|
||||
var deltaPos = Input.mousePosition - prevMousePos;
|
||||
|
||||
var deltaRotation = new Vector3(-deltaPos.y, deltaPos.x) * Time.deltaTime * mouseSpeed;
|
||||
var rotation = cameraRoot.eulerAngles + deltaRotation;
|
||||
|
||||
cameraRoot.eulerAngles = new Vector3(Mathf.Clamp(rotation.x, 0f, 90f), rotation.y);
|
||||
}
|
||||
|
||||
prevMousePos = Input.mousePosition;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
19
Assets/MobileDepthWater/Scripts/TouchRotator.cs.meta
Normal file
19
Assets/MobileDepthWater/Scripts/TouchRotator.cs.meta
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d1b9910e5f079f4e93608f9b3b58bcc
|
||||
timeCreated: 1493309108
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scripts/TouchRotator.cs
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Scripts/Water.meta
Normal file
9
Assets/MobileDepthWater/Scripts/Water.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8858ad60fb56664593478ccb67b8d4b
|
||||
folderAsset: yes
|
||||
timeCreated: 1493665152
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20
Assets/MobileDepthWater/Scripts/Water/WaterArea.cs
Normal file
20
Assets/MobileDepthWater/Scripts/Water/WaterArea.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace Assets.Scripts.Water
|
||||
{
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Area that belongs to some water
|
||||
/// </summary>
|
||||
public class WaterArea : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Water shader properties of the water this area belong
|
||||
/// </summary>
|
||||
[SerializeField] private WaterPropertyBlockSetter waterProperties;
|
||||
|
||||
public MaterialPropertyBlock WaterPropertyBlock
|
||||
{
|
||||
get { return waterProperties.MaterialPropertyBlock; }
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/MobileDepthWater/Scripts/Water/WaterArea.cs.meta
Normal file
19
Assets/MobileDepthWater/Scripts/Water/WaterArea.cs.meta
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8224516acd263b45a7aa9170e00b7ff
|
||||
timeCreated: 1493665152
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scripts/Water/WaterArea.cs
|
||||
uploadId: 179707
|
||||
@@ -0,0 +1,45 @@
|
||||
namespace Assets.Scripts.Water
|
||||
{
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// This class switchs material of dynamic objects if they enter or exit any water area
|
||||
/// After switching to water material it pushes water area properties to dynamic object material
|
||||
/// It allows objects to be under the lake or be in the different water
|
||||
/// Also switching material to diffuse after exiting the water gives a bit performance
|
||||
/// </summary>
|
||||
public class WaterMaterialSwitcher : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Renderer renderer;
|
||||
[SerializeField] private Material waterMaterial;
|
||||
[SerializeField] private Material diffuseMaterial;
|
||||
|
||||
private MaterialPropertyBlock defaulPropertyBlock;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
defaulPropertyBlock = new MaterialPropertyBlock();
|
||||
renderer.GetPropertyBlock(defaulPropertyBlock);
|
||||
}
|
||||
|
||||
public void OnTriggerEnter(Collider collider)
|
||||
{
|
||||
if (collider.tag == "Water")
|
||||
{
|
||||
var waterPropertyBlock = collider.GetComponent<WaterArea>().WaterPropertyBlock;
|
||||
|
||||
renderer.sharedMaterial = waterMaterial;
|
||||
renderer.SetPropertyBlock(waterPropertyBlock);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnTriggerExit(Collider collider)
|
||||
{
|
||||
if (collider.tag == "Water")
|
||||
{
|
||||
renderer.sharedMaterial = diffuseMaterial;
|
||||
renderer.SetPropertyBlock(defaulPropertyBlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43f35e80d9e9de94b9032fbd4aa2b5f7
|
||||
timeCreated: 1493664770
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scripts/Water/WaterMaterialSwitcher.cs
|
||||
uploadId: 179707
|
||||
@@ -0,0 +1,107 @@
|
||||
namespace Assets.Scripts.Water
|
||||
{
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// This class helps you to set water properties for a lot of materials at the same time.
|
||||
/// So you don't have to make it for each independently.
|
||||
/// Put it on the scene, add renderers and set up your water.
|
||||
/// </summary>
|
||||
[ExecuteInEditMode]
|
||||
public class WaterPropertyBlockSetter : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Renderer[] waterRenderers;
|
||||
|
||||
[Space]
|
||||
[SerializeField] private Color waterColor;
|
||||
[SerializeField] private Texture waterTex;
|
||||
[SerializeField] private Vector2 waterTile;
|
||||
[Range(0, 1)][SerializeField] private float textureVisibility;
|
||||
|
||||
[Space]
|
||||
[SerializeField] private Texture distortionTex;
|
||||
[SerializeField] private Vector2 distortionTile;
|
||||
|
||||
[Space]
|
||||
[SerializeField] private float waterHeight;
|
||||
[SerializeField] private float waterDeep;
|
||||
[Range(0, 0.1f)][SerializeField] private float waterDepthParam;
|
||||
[Range(0, 1)][SerializeField] private float waterMinAlpha;
|
||||
|
||||
[Space]
|
||||
[SerializeField] private Color borderColor;
|
||||
[Range(0, 1)][SerializeField] private float borderWidth;
|
||||
|
||||
[Space]
|
||||
[SerializeField] private Vector2 moveDirection;
|
||||
|
||||
private MaterialPropertyBlock materialPropertyBlock;
|
||||
|
||||
public MaterialPropertyBlock MaterialPropertyBlock
|
||||
{
|
||||
get { return materialPropertyBlock; }
|
||||
}
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
materialPropertyBlock = new MaterialPropertyBlock();
|
||||
SetUpPropertyBlock(materialPropertyBlock);
|
||||
|
||||
if (waterRenderers != null)
|
||||
{
|
||||
for (var i = 0; i < waterRenderers.Length; i++)
|
||||
{
|
||||
waterRenderers[i].SetPropertyBlock(materialPropertyBlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public void OnEnable()
|
||||
{
|
||||
materialPropertyBlock = new MaterialPropertyBlock();
|
||||
SetUpPropertyBlock(materialPropertyBlock);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
SetUpPropertyBlock(materialPropertyBlock);
|
||||
|
||||
if (waterRenderers != null)
|
||||
{
|
||||
for (var i = 0; i < waterRenderers.Length; i++)
|
||||
{
|
||||
waterRenderers[i].SetPropertyBlock(materialPropertyBlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private void SetUpPropertyBlock(MaterialPropertyBlock propertyBlock)
|
||||
{
|
||||
propertyBlock.SetColor("_WaterColor", waterColor);
|
||||
propertyBlock.SetColor("_BorderColor", borderColor);
|
||||
|
||||
propertyBlock.SetVector("_Tiling", waterTile);
|
||||
propertyBlock.SetVector("_DistTiling", distortionTile);
|
||||
propertyBlock.SetVector("_MoveDirection", new Vector4(moveDirection.x, 0f, moveDirection.y, 0f));
|
||||
|
||||
if (waterTex != null)
|
||||
{
|
||||
propertyBlock.SetTexture("_WaterTex", waterTex);
|
||||
}
|
||||
|
||||
if (distortionTex != null)
|
||||
{
|
||||
propertyBlock.SetTexture("_DistTex", distortionTex);
|
||||
}
|
||||
|
||||
propertyBlock.SetFloat("_TextureVisibility", textureVisibility);
|
||||
propertyBlock.SetFloat("_WaterHeight", waterHeight);
|
||||
propertyBlock.SetFloat("_WaterDeep", waterDeep);
|
||||
propertyBlock.SetFloat("_WaterDepth", waterDepthParam);
|
||||
propertyBlock.SetFloat("_WaterMinAlpha", waterMinAlpha);
|
||||
propertyBlock.SetFloat("_BorderWidth", borderWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b610d095b4e1b044805a720533b3ce8
|
||||
timeCreated: 1493665152
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Scripts/Water/WaterPropertyBlockSetter.cs
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Shaders.meta
Normal file
9
Assets/MobileDepthWater/Shaders.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36f6b25ad7a4b7d4d94947e23ea5f4fa
|
||||
folderAsset: yes
|
||||
timeCreated: 1493133390
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/MobileDepthWater/Shaders/WaterOpaque.meta
Normal file
9
Assets/MobileDepthWater/Shaders/WaterOpaque.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 632cd2f10f155c24185d24edb6f980bc
|
||||
folderAsset: yes
|
||||
timeCreated: 1493144633
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/MobileDepthWater/Shaders/WaterOpaque/Depth.meta
Normal file
9
Assets/MobileDepthWater/Shaders/WaterOpaque/Depth.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1cc8fd61d919e074992c0f77c28c8fc8
|
||||
folderAsset: yes
|
||||
timeCreated: 1493418164
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,186 @@
|
||||
Shader "Custom/Water/Depth/DiffuseColorWater"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1, 1, 1, 1)
|
||||
|
||||
[Space(20)]
|
||||
_WaterColor ("Water color", Color) = (1, 1, 1, 1)
|
||||
_WaterTex("Water texture", 2D) = "white" {}
|
||||
_Tiling ("Water tiling", Vector) = (1, 1, 1, 1)
|
||||
_TextureVisibility ("Texture visibility", Range(0, 1)) = 1
|
||||
|
||||
[Space(20)]
|
||||
_DistTex ("Distortion", 2D) = "white" {}
|
||||
_DistTiling ("Distortion tiling", Vector) = (1, 1, 1, 1)
|
||||
|
||||
[Space(20)]
|
||||
//_DeepColor ("Water deep color", Color) = (1, 1, 1, 1)
|
||||
_WaterHeight ("Water height", Float) = 0
|
||||
_WaterDeep ("Water deep", Float) = 0
|
||||
_WaterDepth ("Water depth param", Range(0, 0.1)) = 0
|
||||
_WaterMinAlpha ("Water min alpha", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_BorderColor ("Border color", Color) = (1, 1, 1, 1)
|
||||
_BorderWidth ("Border width", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_MoveDirection ("Direction", Vector) = (0, 0, 0, 0)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Opaque" "BW" = "TrueProbes" "LightMode" = "ForwardBase" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityLightingCommon.cginc"
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 normal : NORMAL;
|
||||
float2 uv : TEXCOORD0;
|
||||
#if LIGHTMAP_ON
|
||||
float2 lightmap_uv : TEXCOORD1;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
fixed4 worldPos : TEXCOORD0;
|
||||
fixed camHeightOverWater : TEXCOORD1;
|
||||
fixed waterDepth : TEXCOORD2;
|
||||
UNITY_FOG_COORDS(3)
|
||||
#if LIGHTMAP_ON
|
||||
fixed2 lightmap_uv : TEXCOORD4;
|
||||
#else
|
||||
fixed4 diffuseLight : TEXCOORD4;
|
||||
#endif
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
|
||||
sampler2D _WaterTex;
|
||||
fixed2 _Tiling;
|
||||
fixed4 _WaterColor;
|
||||
|
||||
sampler2D _DistTex;
|
||||
fixed2 _DistTiling;
|
||||
|
||||
fixed4 _DeepColor;
|
||||
fixed _WaterHeight;
|
||||
fixed _TextureVisibility;
|
||||
fixed _WaterDeep;
|
||||
fixed _WaterDepth;
|
||||
fixed _WaterMinAlpha;
|
||||
|
||||
fixed4 _BorderColor;
|
||||
fixed _BorderWidth;
|
||||
fixed _BorderVisibility;
|
||||
|
||||
fixed3 _MoveDirection;
|
||||
|
||||
fixed4 DiffuseLight(fixed3 worldNormal)
|
||||
{
|
||||
half nl = max(0, dot(worldNormal, _WorldSpaceLightPos0.xyz));
|
||||
|
||||
fixed4 diff = nl * _LightColor0;
|
||||
diff.rgb += ShadeSH9(half4(worldNormal, 1));
|
||||
|
||||
return diff;
|
||||
}
|
||||
|
||||
fixed2 WaterPlaneUV(fixed3 worldPos, fixed camHeightOverWater)
|
||||
{
|
||||
fixed3 camToWorldRay = worldPos - _WorldSpaceCameraPos;
|
||||
fixed3 rayToWaterPlane = (camHeightOverWater / camToWorldRay.y * camToWorldRay);
|
||||
return rayToWaterPlane.xz - _WorldSpaceCameraPos.xz;
|
||||
}
|
||||
|
||||
fixed3 LightmapColor(fixed2 lightmap_uv)
|
||||
{
|
||||
fixed4 lightmapCol = UNITY_SAMPLE_TEX2D(unity_Lightmap, lightmap_uv);
|
||||
return DecodeLightmap(lightmapCol);
|
||||
}
|
||||
|
||||
fixed4 MainColor(v2f i)
|
||||
{
|
||||
fixed4 mainCol = _Color;
|
||||
#if LIGHTMAP_ON
|
||||
mainCol.rgb *= LightmapColor(i.lightmap_uv);
|
||||
#else
|
||||
mainCol.rgb *= i.diffuseLight;
|
||||
#endif
|
||||
|
||||
return mainCol;
|
||||
}
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
|
||||
o.worldPos = mul(UNITY_MATRIX_M, v.vertex);
|
||||
o.vertex = mul(UNITY_MATRIX_VP, o.worldPos);
|
||||
|
||||
fixed3 camToWorldRay = o.worldPos - _WorldSpaceCameraPos;
|
||||
o.camHeightOverWater = _WorldSpaceCameraPos.y - _WaterHeight;
|
||||
|
||||
fixed3 rayToWaterPlane = o.camHeightOverWater / (-camToWorldRay.y) * camToWorldRay;
|
||||
fixed depth = length(camToWorldRay - rayToWaterPlane);
|
||||
o.waterDepth = depth * _WaterDepth * saturate(rayToWaterPlane.y - camToWorldRay.y);
|
||||
|
||||
#if LIGHTMAP_ON
|
||||
o.lightmap_uv = v.lightmap_uv.xy * unity_LightmapST.xy + unity_LightmapST.zw;
|
||||
#else
|
||||
fixed4 worldNormal = normalize(mul(UNITY_MATRIX_M, float4(v.normal.xyz, 0)));
|
||||
o.diffuseLight = DiffuseLight(worldNormal.xyz);
|
||||
#endif
|
||||
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
fixed3 worldPosOnPlane = _WorldSpaceCameraPos + rayToWaterPlane;
|
||||
fixed3 positionForFog = lerp(worldPosOnPlane, o.worldPos.xyz, o.worldPos.y > _WaterHeight);
|
||||
fixed4 waterVertex = mul(UNITY_MATRIX_VP, fixed4(positionForFog, 1));
|
||||
UNITY_TRANSFER_FOG(o, waterVertex);
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed lengthUnderWater = max(0, _WaterHeight - i.worldPos.y);
|
||||
fixed underWater = lerp(0, 1, lengthUnderWater > 0);
|
||||
fixed borderAlpha = lerp(underWater * _BorderColor.a, 0, saturate(lengthUnderWater / _BorderWidth));
|
||||
fixed waterAlpha = saturate(lengthUnderWater / _WaterDeep + _WaterMinAlpha + i.waterDepth);
|
||||
|
||||
fixed4 mainCol = MainColor(i);
|
||||
|
||||
fixed2 water_uv = WaterPlaneUV(i.worldPos, i.camHeightOverWater);
|
||||
fixed4 distortion = tex2D(_DistTex, water_uv * _DistTiling) * 2 - 1;
|
||||
fixed2 distorted_uv = ((water_uv + distortion.rg) - _Time.y * _MoveDirection.xz) * _Tiling;
|
||||
|
||||
fixed4 waterCol = tex2D(_WaterTex, distorted_uv);
|
||||
waterCol = lerp(_WaterColor, fixed4(1, 1, 1, 1), waterCol.r * _TextureVisibility);
|
||||
|
||||
fixed4 finalCol = lerp(mainCol, waterCol, _WaterColor.a * waterAlpha * underWater);
|
||||
finalCol.rgb = lerp(finalCol.rgb, _BorderColor.rgb, borderAlpha);
|
||||
|
||||
UNITY_APPLY_FOG(i.fogCoord, finalCol);
|
||||
|
||||
//return fixed4(i.waterDepth, 0, 0, 1);
|
||||
return finalCol;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb270c1e5be780e46b05d4a023cd7e73
|
||||
timeCreated: 1493134247
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Shaders/WaterOpaque/Depth/DiffuseColorDepthWater.shader
|
||||
uploadId: 179707
|
||||
@@ -0,0 +1,192 @@
|
||||
Shader "Custom/Water/Depth/DiffuseWater"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1, 1, 1, 1)
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
|
||||
[Space(20)]
|
||||
_WaterColor ("Water color", Color) = (1, 1, 1, 1)
|
||||
_WaterTex("Water texture", 2D) = "white" {}
|
||||
_Tiling ("Water tiling", Vector) = (1, 1, 1, 1)
|
||||
_TextureVisibility ("Texture visibility", Range(0, 1)) = 1
|
||||
|
||||
[Space(20)]
|
||||
_DistTex ("Distortion", 2D) = "white" {}
|
||||
_DistTiling ("Distortion tiling", Vector) = (1, 1, 1, 1)
|
||||
|
||||
[Space(20)]
|
||||
//_DeepColor ("Water deep color", Color) = (1, 1, 1, 1)
|
||||
_WaterHeight ("Water height", Float) = 0
|
||||
_WaterDeep ("Water deep", Float) = 0
|
||||
_WaterDepth ("Water depth param", Range(0, 0.1)) = 0
|
||||
_WaterMinAlpha ("Water min alpha", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_BorderColor ("Border color", Color) = (1, 1, 1, 1)
|
||||
_BorderWidth ("Border width", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_MoveDirection ("Direction", Vector) = (0, 0, 0, 0)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Opaque" "BW" = "TrueProbes" "LightMode" = "ForwardBase" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityLightingCommon.cginc"
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 normal : NORMAL;
|
||||
float2 uv : TEXCOORD0;
|
||||
#if LIGHTMAP_ON
|
||||
float2 lightmap_uv : TEXCOORD1;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
fixed4 worldPos : TEXCOORD1;
|
||||
fixed camHeightOverWater : TEXCOORD2;
|
||||
fixed waterDepth : TEXCOORD3;
|
||||
UNITY_FOG_COORDS(4)
|
||||
#if LIGHTMAP_ON
|
||||
fixed2 lightmap_uv : TEXCOORD5;
|
||||
#else
|
||||
fixed4 diffuseLight : TEXCOORD5;
|
||||
#endif
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
sampler2D _WaterTex;
|
||||
fixed2 _Tiling;
|
||||
fixed4 _WaterColor;
|
||||
|
||||
sampler2D _DistTex;
|
||||
fixed2 _DistTiling;
|
||||
|
||||
fixed4 _DeepColor;
|
||||
fixed _WaterHeight;
|
||||
fixed _TextureVisibility;
|
||||
fixed _WaterDeep;
|
||||
fixed _WaterDepth;
|
||||
fixed _WaterMinAlpha;
|
||||
|
||||
fixed4 _BorderColor;
|
||||
fixed _BorderWidth;
|
||||
fixed _BorderVisibility;
|
||||
|
||||
fixed3 _MoveDirection;
|
||||
|
||||
fixed4 DiffuseLight(fixed3 worldNormal)
|
||||
{
|
||||
half nl = max(0, dot(worldNormal, _WorldSpaceLightPos0.xyz));
|
||||
|
||||
fixed4 diff = nl * _LightColor0;
|
||||
diff.rgb += ShadeSH9(half4(worldNormal, 1));
|
||||
|
||||
return diff;
|
||||
}
|
||||
|
||||
fixed2 WaterPlaneUV(fixed3 worldPos, fixed camHeightOverWater)
|
||||
{
|
||||
fixed3 camToWorldRay = worldPos - _WorldSpaceCameraPos;
|
||||
fixed3 rayToWaterPlane = (camHeightOverWater / camToWorldRay.y * camToWorldRay);
|
||||
return rayToWaterPlane.xz - _WorldSpaceCameraPos.xz;
|
||||
}
|
||||
|
||||
fixed3 LightmapColor(fixed2 lightmap_uv)
|
||||
{
|
||||
fixed4 lightmapCol = UNITY_SAMPLE_TEX2D(unity_Lightmap, lightmap_uv);
|
||||
return DecodeLightmap(lightmapCol);
|
||||
}
|
||||
|
||||
fixed4 MainColor(v2f i)
|
||||
{
|
||||
fixed4 mainCol = tex2D(_MainTex, i.uv) * _Color;
|
||||
#if LIGHTMAP_ON
|
||||
mainCol.rgb *= LightmapColor(i.lightmap_uv);
|
||||
#else
|
||||
mainCol.rgb *= i.diffuseLight;
|
||||
#endif
|
||||
|
||||
return mainCol;
|
||||
}
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
|
||||
o.worldPos = mul(UNITY_MATRIX_M, v.vertex);
|
||||
o.vertex = mul(UNITY_MATRIX_VP, o.worldPos);
|
||||
|
||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||
|
||||
fixed3 camToWorldRay = o.worldPos - _WorldSpaceCameraPos;
|
||||
o.camHeightOverWater = _WorldSpaceCameraPos.y - _WaterHeight;
|
||||
|
||||
fixed3 rayToWaterPlane = o.camHeightOverWater / (-camToWorldRay.y) * camToWorldRay;
|
||||
fixed depth = length(camToWorldRay - rayToWaterPlane);
|
||||
o.waterDepth = depth * _WaterDepth * saturate(rayToWaterPlane.y - camToWorldRay.y);;
|
||||
|
||||
#if LIGHTMAP_ON
|
||||
o.lightmap_uv = v.lightmap_uv.xy * unity_LightmapST.xy + unity_LightmapST.zw;
|
||||
#else
|
||||
fixed4 worldNormal = normalize(mul(UNITY_MATRIX_M, float4(v.normal.xyz, 0)));
|
||||
o.diffuseLight = DiffuseLight(worldNormal.xyz);
|
||||
#endif
|
||||
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
fixed3 worldPosOnPlane = _WorldSpaceCameraPos + rayToWaterPlane;
|
||||
fixed3 positionForFog = lerp(worldPosOnPlane, o.worldPos.xyz, o.worldPos.y > _WaterHeight);
|
||||
fixed4 waterVertex = mul(UNITY_MATRIX_VP, fixed4(positionForFog, 1));
|
||||
UNITY_TRANSFER_FOG(o, waterVertex);
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed lengthUnderWater = max(0, _WaterHeight - i.worldPos.y);
|
||||
fixed underWater = lerp(0, 1, lengthUnderWater > 0);
|
||||
fixed borderAlpha = lerp(underWater * _BorderColor.a, 0, saturate(lengthUnderWater / _BorderWidth));
|
||||
fixed waterAlpha = saturate(lengthUnderWater / _WaterDeep + _WaterMinAlpha + i.waterDepth);
|
||||
|
||||
fixed4 mainCol = MainColor(i);
|
||||
|
||||
fixed2 water_uv = WaterPlaneUV(i.worldPos, i.camHeightOverWater);
|
||||
fixed4 distortion = tex2D(_DistTex, water_uv * _DistTiling) * 2 - 1;
|
||||
fixed2 distorted_uv = ((water_uv + distortion.rg) - _Time.y * _MoveDirection.xz) * _Tiling;
|
||||
|
||||
fixed4 waterCol = tex2D(_WaterTex, distorted_uv);
|
||||
waterCol = lerp(_WaterColor, fixed4(1, 1, 1, 1), waterCol.r * _TextureVisibility);
|
||||
|
||||
fixed4 finalCol = lerp(mainCol, waterCol, _WaterColor.a * waterAlpha * underWater);
|
||||
finalCol.rgb = lerp(finalCol.rgb, _BorderColor.rgb, borderAlpha);
|
||||
|
||||
UNITY_APPLY_FOG(i.fogCoord, finalCol);
|
||||
|
||||
//return fixed4(reflection, 0, 0, 1);
|
||||
return finalCol;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7e85ac45d06bba48b3f9c38ef023f7b
|
||||
timeCreated: 1493134247
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Shaders/WaterOpaque/Depth/DiffuseDepthWater.shader
|
||||
uploadId: 179707
|
||||
@@ -0,0 +1,112 @@
|
||||
Shader "Custom/Water/DiffuseWaterOpaque"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_WaterColor ("Water color", Color) = (1, 1, 1, 1)
|
||||
_WaterTex ("Water texture", 2D) = "white" {}
|
||||
_Tiling ("Water tiling", Vector) = (1, 1, 1, 1)
|
||||
_TextureVisibility("Texture visibility", Range(0, 1)) = 1
|
||||
|
||||
[Space(20)]
|
||||
_DistTex ("Distortion", 2D) = "white" {}
|
||||
_DistTiling ("Distortion tiling", Vector) = (1, 1, 1, 1)
|
||||
|
||||
[Space(20)]
|
||||
_WaterHeight ("Water height", Float) = 0
|
||||
|
||||
[Space(20)]
|
||||
_MoveDirection ("Direction", Vector) = (0, 0, 0, 0)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Opaque" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
fixed4 worldPos: TEXCOORD1;
|
||||
fixed camHeightOverWater : TEXCOORD2;
|
||||
UNITY_FOG_COORDS(3)
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
sampler2D _WaterTex;
|
||||
fixed2 _Tiling;
|
||||
fixed4 _WaterColor;
|
||||
|
||||
sampler2D _DistTex;
|
||||
fixed2 _DistTiling;
|
||||
|
||||
fixed _WaterHeight;
|
||||
fixed _TextureVisibility;
|
||||
|
||||
fixed3 _MoveDirection;
|
||||
|
||||
fixed2 WaterPlaneUV(fixed3 worldPos, fixed camHeightOverWater)
|
||||
{
|
||||
fixed3 camToWorldRay = worldPos - _WorldSpaceCameraPos;
|
||||
fixed3 rayToWaterPlane = (camHeightOverWater / camToWorldRay.y * camToWorldRay);
|
||||
return rayToWaterPlane.xz - _WorldSpaceCameraPos.xz;
|
||||
}
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
|
||||
o.worldPos = mul(UNITY_MATRIX_M, v.vertex);
|
||||
o.vertex = mul(UNITY_MATRIX_VP, o.worldPos);
|
||||
|
||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||
o.camHeightOverWater = _WorldSpaceCameraPos.y - _WaterHeight;
|
||||
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
fixed3 camToWorldRay = o.worldPos - _WorldSpaceCameraPos;
|
||||
fixed3 rayToWaterPlane = (o.camHeightOverWater / camToWorldRay.y * camToWorldRay);
|
||||
|
||||
fixed3 worldPosOnPlane = _WorldSpaceCameraPos - rayToWaterPlane;
|
||||
fixed3 positionForFog = lerp(worldPosOnPlane, o.worldPos.xyz, o.worldPos.y > _WaterHeight);
|
||||
fixed4 waterVertex = mul(UNITY_MATRIX_VP, fixed4(positionForFog, 1));
|
||||
UNITY_TRANSFER_FOG(o, waterVertex);
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed2 water_uv = WaterPlaneUV(i.worldPos, i.camHeightOverWater);
|
||||
fixed4 distortion = tex2D(_DistTex, water_uv * _DistTiling) * 2 - 1;
|
||||
fixed2 distorted_uv = ((water_uv + distortion.rg) - _Time.y * _MoveDirection.xz) * _Tiling;
|
||||
|
||||
fixed4 waterCol = tex2D(_WaterTex, distorted_uv);
|
||||
waterCol = lerp(_WaterColor, fixed4(1, 1, 1, 1), waterCol.r * _TextureVisibility);
|
||||
|
||||
UNITY_APPLY_FOG(i.fogCoord, waterCol);
|
||||
|
||||
return waterCol;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12a8cc6f8fa05ab49a845b58de64c0ee
|
||||
timeCreated: 1493134247
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Shaders/WaterOpaque/DiffuseWaterOpaque.shader
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Shaders/WaterOpaque/Height.meta
Normal file
9
Assets/MobileDepthWater/Shaders/WaterOpaque/Height.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e062190da4e75949b852630e2f9d775
|
||||
folderAsset: yes
|
||||
timeCreated: 1493418171
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,184 @@
|
||||
Shader "Custom/Water/Height/DiffuseColorWater"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1, 1, 1, 1)
|
||||
|
||||
[Space(20)]
|
||||
_WaterColor ("Water color", Color) = (1, 1, 1, 1)
|
||||
_WaterTex("Water texture", 2D) = "white" {}
|
||||
_Tiling ("Water tiling", Vector) = (1, 1, 1, 1)
|
||||
_TextureVisibility("Texture visibility", Range(0, 1)) = 1
|
||||
|
||||
[Space(20)]
|
||||
_DistTex ("Distortion", 2D) = "white" {}
|
||||
_DistTiling ("Distortion tiling", Vector) = (1, 1, 1, 1)
|
||||
|
||||
[Space(20)]
|
||||
//_DeepColor ("Water deep color", Color) = (1, 1, 1, 1)
|
||||
_WaterHeight ("Water height", Float) = 0
|
||||
_WaterDeep ("Water deep", Float) = 0
|
||||
_WaterMinAlpha ("Water min alpha", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_BorderColor ("Border color", Color) = (1, 1, 1, 1)
|
||||
_BorderWidth ("Border width", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_MoveDirection ("Direction", Vector) = (0, 0, 0, 0)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Opaque" "BW" = "TrueProbes" "LightMode" = "ForwardBase" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityLightingCommon.cginc"
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 normal : NORMAL;
|
||||
float2 uv : TEXCOORD0;
|
||||
#if LIGHTMAP_ON
|
||||
float2 lightmap_uv : TEXCOORD1;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
fixed4 worldPos : TEXCOORD1;
|
||||
fixed camHeightOverWater : TEXCOORD2;
|
||||
UNITY_FOG_COORDS(3)
|
||||
#if LIGHTMAP_ON
|
||||
fixed2 lightmap_uv : TEXCOORD4;
|
||||
#else
|
||||
fixed4 diffuseLight : TEXCOORD4;
|
||||
#endif
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
|
||||
sampler2D _WaterTex;
|
||||
float4 _WaterTex_ST;
|
||||
fixed2 _Tiling;
|
||||
fixed4 _WaterColor;
|
||||
|
||||
sampler2D _DistTex;
|
||||
fixed2 _DistTiling;
|
||||
|
||||
fixed4 _DeepColor;
|
||||
fixed _WaterHeight;
|
||||
fixed _TextureVisibility;
|
||||
fixed _WaterDeep;
|
||||
fixed _WaterMinAlpha;
|
||||
|
||||
fixed4 _BorderColor;
|
||||
fixed _BorderWidth;
|
||||
fixed _BorderVisibility;
|
||||
|
||||
fixed3 _MoveDirection;
|
||||
|
||||
fixed4 DiffuseLight(fixed3 worldNormal)
|
||||
{
|
||||
half nl = max(0, dot(worldNormal, _WorldSpaceLightPos0.xyz));
|
||||
|
||||
fixed4 diff = nl * _LightColor0;
|
||||
diff.rgb += ShadeSH9(half4(worldNormal, 1));
|
||||
|
||||
return diff;
|
||||
}
|
||||
|
||||
fixed2 WaterPlaneUV(fixed3 worldPos, fixed camHeightOverWater)
|
||||
{
|
||||
fixed3 camToWorldRay = worldPos - _WorldSpaceCameraPos;
|
||||
fixed3 rayToWaterPlane = (camHeightOverWater / camToWorldRay.y * camToWorldRay);
|
||||
return rayToWaterPlane.xz - _WorldSpaceCameraPos.xz;
|
||||
}
|
||||
|
||||
fixed3 LightmapColor(fixed2 lightmap_uv)
|
||||
{
|
||||
fixed4 lightmapCol = UNITY_SAMPLE_TEX2D(unity_Lightmap, lightmap_uv);
|
||||
return DecodeLightmap(lightmapCol);
|
||||
}
|
||||
|
||||
fixed4 MainColor(v2f i)
|
||||
{
|
||||
fixed4 mainCol = _Color;
|
||||
#if LIGHTMAP_ON
|
||||
mainCol.rgb *= LightmapColor(i.lightmap_uv);
|
||||
#else
|
||||
mainCol.rgb *= i.diffuseLight;
|
||||
#endif
|
||||
|
||||
return mainCol;
|
||||
}
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
|
||||
o.worldPos = mul(UNITY_MATRIX_M, v.vertex);
|
||||
o.vertex = mul(UNITY_MATRIX_VP, o.worldPos);
|
||||
|
||||
o.uv = TRANSFORM_TEX(v.uv, _WaterTex);
|
||||
o.camHeightOverWater = _WorldSpaceCameraPos.y - _WaterHeight;
|
||||
|
||||
#if LIGHTMAP_ON
|
||||
o.lightmap_uv = v.lightmap_uv.xy * unity_LightmapST.xy + unity_LightmapST.zw;
|
||||
#else
|
||||
fixed4 worldNormal = normalize(mul(UNITY_MATRIX_M, float4(v.normal.xyz, 0)));
|
||||
o.diffuseLight = DiffuseLight(worldNormal.xyz);
|
||||
#endif
|
||||
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
fixed3 camToWorldRay = o.worldPos - _WorldSpaceCameraPos;
|
||||
fixed3 rayToWaterPlane = (o.camHeightOverWater / camToWorldRay.y * camToWorldRay);
|
||||
|
||||
fixed3 worldPosOnPlane = _WorldSpaceCameraPos - rayToWaterPlane;
|
||||
fixed3 positionForFog = lerp(worldPosOnPlane, o.worldPos.xyz, o.worldPos.y > _WaterHeight);
|
||||
fixed4 waterVertex = mul(UNITY_MATRIX_VP, fixed4(positionForFog, 1));
|
||||
UNITY_TRANSFER_FOG(o, waterVertex);
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed lengthUnderWater = max(0, _WaterHeight - i.worldPos.y);
|
||||
fixed underWater = lerp(0, 1, lengthUnderWater > 0);
|
||||
fixed borderAlpha = lerp(underWater * _BorderColor.a, 0, saturate(lengthUnderWater / _BorderWidth));
|
||||
fixed waterAlpha = saturate(lengthUnderWater / _WaterDeep + _WaterMinAlpha);
|
||||
|
||||
fixed4 mainCol = MainColor(i);
|
||||
|
||||
fixed2 water_uv = WaterPlaneUV(i.worldPos, i.camHeightOverWater);
|
||||
fixed4 distortion = tex2D(_DistTex, water_uv * _DistTiling) * 2 - 1;
|
||||
fixed2 distorted_uv = ((water_uv + distortion.rg) - _Time.y * _MoveDirection.xz) * _Tiling;
|
||||
|
||||
fixed4 waterCol = tex2D(_WaterTex, distorted_uv);
|
||||
waterCol = lerp(_WaterColor, fixed4(1, 1, 1, 1), waterCol.r * _TextureVisibility);
|
||||
|
||||
fixed4 finalCol = lerp(mainCol, waterCol, _WaterColor.a * waterAlpha * underWater);
|
||||
finalCol.rgb = lerp(finalCol.rgb, _BorderColor.rgb, borderAlpha);
|
||||
|
||||
UNITY_APPLY_FOG(i.fogCoord, finalCol);
|
||||
|
||||
//return fixed4(reflection, 0, 0, 1);
|
||||
return finalCol;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db40be83fcff3ea48b6d4ddba9b8a9db
|
||||
timeCreated: 1493134247
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Shaders/WaterOpaque/Height/DiffuseColorHeightWater.shader
|
||||
uploadId: 179707
|
||||
@@ -0,0 +1,186 @@
|
||||
Shader "Custom/Water/Height/DiffuseWater"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1, 1, 1, 1)
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
|
||||
[Space(20)]
|
||||
_WaterColor ("Water color", Color) = (1, 1, 1, 1)
|
||||
_WaterTex("Water texture", 2D) = "white" {}
|
||||
_Tiling ("Water tiling", Vector) = (1, 1, 1, 1)
|
||||
_TextureVisibility("Texture visibility", Range(0, 1)) = 1
|
||||
|
||||
[Space(20)]
|
||||
_DistTex ("Distortion", 2D) = "white" {}
|
||||
_DistTiling ("Distortion tiling", Vector) = (1, 1, 1, 1)
|
||||
|
||||
[Space(20)]
|
||||
//_DeepColor ("Water deep color", Color) = (1, 1, 1, 1)
|
||||
_WaterHeight ("Water height", Float) = 0
|
||||
_WaterDeep ("Water deep", Float) = 0
|
||||
_WaterMinAlpha ("Water min alpha", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_BorderColor ("Border color", Color) = (1, 1, 1, 1)
|
||||
_BorderWidth ("Border width", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_MoveDirection ("Direction", Vector) = (0, 0, 0, 0)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Opaque" "BW" = "TrueProbes" "LightMode" = "ForwardBase" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityLightingCommon.cginc"
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 normal : NORMAL;
|
||||
float2 uv : TEXCOORD0;
|
||||
#if LIGHTMAP_ON
|
||||
float2 lightmap_uv : TEXCOORD1;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
fixed4 worldPos : TEXCOORD1;
|
||||
fixed camHeightOverWater : TEXCOORD2;
|
||||
UNITY_FOG_COORDS(3)
|
||||
#if LIGHTMAP_ON
|
||||
fixed2 lightmap_uv : TEXCOORD4;
|
||||
#else
|
||||
fixed4 diffuseLight : TEXCOORD4;
|
||||
#endif
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
sampler2D _WaterTex;
|
||||
fixed2 _Tiling;
|
||||
fixed4 _WaterColor;
|
||||
|
||||
sampler2D _DistTex;
|
||||
fixed2 _DistTiling;
|
||||
|
||||
fixed4 _DeepColor;
|
||||
fixed _WaterHeight;
|
||||
fixed _TextureVisibility;
|
||||
fixed _WaterDeep;
|
||||
fixed _WaterMinAlpha;
|
||||
|
||||
fixed4 _BorderColor;
|
||||
fixed _BorderWidth;
|
||||
fixed _BorderVisibility;
|
||||
|
||||
fixed3 _MoveDirection;
|
||||
|
||||
fixed4 DiffuseLight(fixed3 worldNormal)
|
||||
{
|
||||
half nl = max(0, dot(worldNormal, _WorldSpaceLightPos0.xyz));
|
||||
|
||||
fixed4 diff = nl * _LightColor0;
|
||||
diff.rgb += ShadeSH9(half4(worldNormal, 1));
|
||||
|
||||
return diff;
|
||||
}
|
||||
|
||||
fixed2 WaterPlaneUV(fixed3 worldPos, fixed camHeightOverWater)
|
||||
{
|
||||
fixed3 camToWorldRay = worldPos - _WorldSpaceCameraPos;
|
||||
fixed3 rayToWaterPlane = (camHeightOverWater / camToWorldRay.y * camToWorldRay);
|
||||
return rayToWaterPlane.xz - _WorldSpaceCameraPos.xz;
|
||||
}
|
||||
|
||||
fixed3 LightmapColor(fixed2 lightmap_uv)
|
||||
{
|
||||
fixed4 lightmapCol = UNITY_SAMPLE_TEX2D(unity_Lightmap, lightmap_uv);
|
||||
return DecodeLightmap(lightmapCol);
|
||||
}
|
||||
|
||||
fixed4 MainColor(v2f i)
|
||||
{
|
||||
fixed4 mainCol = tex2D(_MainTex, i.uv) * _Color;
|
||||
#if LIGHTMAP_ON
|
||||
mainCol.rgb *= LightmapColor(i.lightmap_uv);
|
||||
#else
|
||||
mainCol.rgb *= i.diffuseLight;
|
||||
#endif
|
||||
|
||||
return mainCol;
|
||||
}
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
|
||||
o.worldPos = mul(UNITY_MATRIX_M, v.vertex);
|
||||
o.vertex = mul(UNITY_MATRIX_VP, o.worldPos);
|
||||
|
||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||
o.camHeightOverWater = _WorldSpaceCameraPos.y - _WaterHeight;
|
||||
|
||||
#if LIGHTMAP_ON
|
||||
o.lightmap_uv = v.lightmap_uv.xy * unity_LightmapST.xy + unity_LightmapST.zw;
|
||||
#else
|
||||
fixed4 worldNormal = normalize(mul(UNITY_MATRIX_M, float4(v.normal.xyz, 0)));
|
||||
o.diffuseLight = DiffuseLight(worldNormal.xyz);
|
||||
#endif
|
||||
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
fixed3 camToWorldRay = o.worldPos - _WorldSpaceCameraPos;
|
||||
fixed3 rayToWaterPlane = (o.camHeightOverWater / camToWorldRay.y * camToWorldRay);
|
||||
|
||||
fixed3 worldPosOnPlane = _WorldSpaceCameraPos - rayToWaterPlane;
|
||||
fixed3 positionForFog = lerp(worldPosOnPlane, o.worldPos.xyz, o.worldPos.y > _WaterHeight);
|
||||
fixed4 waterVertex = mul(UNITY_MATRIX_VP, fixed4(positionForFog, 1));
|
||||
UNITY_TRANSFER_FOG(o, waterVertex);
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed lengthUnderWater = max(0, _WaterHeight - i.worldPos.y);
|
||||
fixed underWater = lerp(0, 1, lengthUnderWater > 0);
|
||||
fixed borderAlpha = lerp(underWater * _BorderColor.a, 0, saturate(lengthUnderWater / _BorderWidth));
|
||||
fixed waterAlpha = saturate(lengthUnderWater / _WaterDeep + _WaterMinAlpha);
|
||||
|
||||
fixed4 mainCol = MainColor(i);
|
||||
|
||||
fixed2 water_uv = WaterPlaneUV(i.worldPos, i.camHeightOverWater);
|
||||
fixed4 distortion = tex2D(_DistTex, water_uv * _DistTiling) * 2 - 1;
|
||||
fixed2 distorted_uv = ((water_uv + distortion.rg) - _Time.y * _MoveDirection.xz) * _Tiling;
|
||||
|
||||
fixed4 waterCol = tex2D(_WaterTex, distorted_uv);
|
||||
waterCol = lerp(_WaterColor, fixed4(1, 1, 1, 1), waterCol.r * _TextureVisibility);
|
||||
|
||||
fixed4 finalCol = lerp(mainCol, waterCol, _WaterColor.a * waterAlpha * underWater);
|
||||
finalCol.rgb = lerp(finalCol.rgb, _BorderColor.rgb, borderAlpha);
|
||||
|
||||
UNITY_APPLY_FOG(i.fogCoord, finalCol);
|
||||
|
||||
//return fixed4(reflection, 0, 0, 1);
|
||||
return finalCol;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c457a2dd112aafe4f9008b8dd0c15a31
|
||||
timeCreated: 1493134247
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Shaders/WaterOpaque/Height/DiffuseHeightWater.shader
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Shaders/WaterTwoSide.meta
Normal file
9
Assets/MobileDepthWater/Shaders/WaterTwoSide.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0250523c753206d488cedbd62550b59a
|
||||
folderAsset: yes
|
||||
timeCreated: 1493144633
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/MobileDepthWater/Shaders/WaterTwoSide/Depth.meta
Normal file
9
Assets/MobileDepthWater/Shaders/WaterTwoSide/Depth.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dac9c720acd24f44398957e83cc3b87c
|
||||
folderAsset: yes
|
||||
timeCreated: 1493418164
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,187 @@
|
||||
Shader "Custom/Water/TwoSide/Depth/DiffuseColorWater"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1, 1, 1, 1)
|
||||
|
||||
[Space(20)]
|
||||
_WaterColor ("Water color", Color) = (1, 1, 1, 1)
|
||||
_WaterTex("Water texture", 2D) = "white" {}
|
||||
_Tiling ("Water tiling", Vector) = (1, 1, 1, 1)
|
||||
_TextureVisibility ("Texture visibility", Range(0, 1)) = 1
|
||||
|
||||
[Space(20)]
|
||||
_DistTex ("Distortion", 2D) = "white" {}
|
||||
_DistTiling ("Distortion tiling", Vector) = (1, 1, 1, 1)
|
||||
|
||||
[Space(20)]
|
||||
//_DeepColor ("Water deep color", Color) = (1, 1, 1, 1)
|
||||
_WaterHeight ("Water height", Float) = 0
|
||||
_WaterDeep ("Water deep", Float) = 0
|
||||
_WaterDepth ("Water depth param", Range(0, 0.1)) = 0
|
||||
_WaterMinAlpha ("Water min alpha", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_BorderColor ("Border color", Color) = (1, 1, 1, 1)
|
||||
_BorderWidth ("Border width", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_MoveDirection ("Direction", Vector) = (0, 0, 0, 0)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Opaque" "BW" = "TrueProbes" "LightMode" = "ForwardBase" }
|
||||
LOD 100
|
||||
Cull Off
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityLightingCommon.cginc"
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 normal : NORMAL;
|
||||
float2 uv : TEXCOORD0;
|
||||
#if LIGHTMAP_ON
|
||||
float2 lightmap_uv : TEXCOORD1;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
fixed4 worldPos : TEXCOORD0;
|
||||
fixed camHeightOverWater : TEXCOORD1;
|
||||
fixed waterDepth : TEXCOORD2;
|
||||
UNITY_FOG_COORDS(3)
|
||||
#if LIGHTMAP_ON
|
||||
fixed2 lightmap_uv : TEXCOORD4;
|
||||
#else
|
||||
fixed4 diffuseLight : TEXCOORD4;
|
||||
#endif
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
|
||||
sampler2D _WaterTex;
|
||||
fixed2 _Tiling;
|
||||
fixed4 _WaterColor;
|
||||
|
||||
sampler2D _DistTex;
|
||||
fixed2 _DistTiling;
|
||||
|
||||
fixed4 _DeepColor;
|
||||
fixed _WaterHeight;
|
||||
fixed _TextureVisibility;
|
||||
fixed _WaterDeep;
|
||||
fixed _WaterDepth;
|
||||
fixed _WaterMinAlpha;
|
||||
|
||||
fixed4 _BorderColor;
|
||||
fixed _BorderWidth;
|
||||
fixed _BorderVisibility;
|
||||
|
||||
fixed3 _MoveDirection;
|
||||
|
||||
fixed4 DiffuseLight(fixed3 worldNormal)
|
||||
{
|
||||
half nl = max(0, dot(worldNormal, _WorldSpaceLightPos0.xyz));
|
||||
|
||||
fixed4 diff = nl * _LightColor0;
|
||||
diff.rgb += ShadeSH9(half4(worldNormal, 1));
|
||||
|
||||
return diff;
|
||||
}
|
||||
|
||||
fixed2 WaterPlaneUV(fixed3 worldPos, fixed camHeightOverWater)
|
||||
{
|
||||
fixed3 camToWorldRay = worldPos - _WorldSpaceCameraPos;
|
||||
fixed3 rayToWaterPlane = (camHeightOverWater / camToWorldRay.y * camToWorldRay);
|
||||
return rayToWaterPlane.xz - _WorldSpaceCameraPos.xz;
|
||||
}
|
||||
|
||||
fixed3 LightmapColor(fixed2 lightmap_uv)
|
||||
{
|
||||
fixed4 lightmapCol = UNITY_SAMPLE_TEX2D(unity_Lightmap, lightmap_uv);
|
||||
return DecodeLightmap(lightmapCol);
|
||||
}
|
||||
|
||||
fixed4 MainColor(v2f i)
|
||||
{
|
||||
fixed4 mainCol = _Color;
|
||||
#if LIGHTMAP_ON
|
||||
mainCol.rgb *= LightmapColor(i.lightmap_uv);
|
||||
#else
|
||||
mainCol.rgb *= i.diffuseLight;
|
||||
#endif
|
||||
|
||||
return mainCol;
|
||||
}
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
|
||||
o.worldPos = mul(UNITY_MATRIX_M, v.vertex);
|
||||
o.vertex = mul(UNITY_MATRIX_VP, o.worldPos);
|
||||
|
||||
fixed3 camToWorldRay = o.worldPos - _WorldSpaceCameraPos;
|
||||
o.camHeightOverWater = _WorldSpaceCameraPos.y - _WaterHeight;
|
||||
|
||||
fixed3 rayToWaterPlane = o.camHeightOverWater / (-camToWorldRay.y) * camToWorldRay;
|
||||
fixed depth = length(camToWorldRay - rayToWaterPlane);
|
||||
o.waterDepth = depth * _WaterDepth * saturate(rayToWaterPlane.y - camToWorldRay.y);
|
||||
|
||||
#if LIGHTMAP_ON
|
||||
o.lightmap_uv = v.lightmap_uv.xy * unity_LightmapST.xy + unity_LightmapST.zw;
|
||||
#else
|
||||
fixed4 worldNormal = normalize(mul(UNITY_MATRIX_M, float4(v.normal.xyz, 0)));
|
||||
o.diffuseLight = DiffuseLight(worldNormal.xyz);
|
||||
#endif
|
||||
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
fixed3 worldPosOnPlane = _WorldSpaceCameraPos + rayToWaterPlane;
|
||||
fixed3 positionForFog = lerp(worldPosOnPlane, o.worldPos.xyz, o.worldPos.y > _WaterHeight);
|
||||
fixed4 waterVertex = mul(UNITY_MATRIX_VP, fixed4(positionForFog, 1));
|
||||
UNITY_TRANSFER_FOG(o, waterVertex);
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed lengthUnderWater = max(0, _WaterHeight - i.worldPos.y);
|
||||
fixed underWater = lerp(0, 1, lengthUnderWater > 0);
|
||||
fixed borderAlpha = lerp(underWater * _BorderColor.a, 0, saturate(lengthUnderWater / _BorderWidth));
|
||||
fixed waterAlpha = saturate(lengthUnderWater / _WaterDeep + _WaterMinAlpha + i.waterDepth);
|
||||
|
||||
fixed4 mainCol = MainColor(i);
|
||||
|
||||
fixed2 water_uv = WaterPlaneUV(i.worldPos, i.camHeightOverWater);
|
||||
fixed4 distortion = tex2D(_DistTex, water_uv * _DistTiling) * 2 - 1;
|
||||
fixed2 distorted_uv = ((water_uv + distortion.rg) - _Time.y * _MoveDirection.xz) * _Tiling;
|
||||
|
||||
fixed4 waterCol = tex2D(_WaterTex, distorted_uv);
|
||||
waterCol = lerp(_WaterColor, fixed4(1, 1, 1, 1), waterCol.r * _TextureVisibility);
|
||||
|
||||
fixed4 finalCol = lerp(mainCol, waterCol, _WaterColor.a * waterAlpha * underWater);
|
||||
finalCol.rgb = lerp(finalCol.rgb, _BorderColor.rgb, borderAlpha);
|
||||
|
||||
UNITY_APPLY_FOG(i.fogCoord, finalCol);
|
||||
|
||||
//return fixed4(i.waterDepth, 0, 0, 1);
|
||||
return finalCol;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2065017c9f60034a921e136ee175344
|
||||
timeCreated: 1493134247
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Shaders/WaterTwoSide/Depth/DiffuseColorDepthWaterTwoSide.shader
|
||||
uploadId: 179707
|
||||
@@ -0,0 +1,194 @@
|
||||
Shader "Custom/Water/TwoSide/Depth/DiffuseWater"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Color ("Color", Color) = (1, 1, 1, 1)
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
|
||||
[Space(20)]
|
||||
_WaterColor ("Water color", Color) = (1, 1, 1, 1)
|
||||
_WaterTex("Water texture", 2D) = "white" {}
|
||||
_Tiling ("Water tiling", Vector) = (1, 1, 1, 1)
|
||||
_TextureVisibility ("Texture visibility", Range(0, 1)) = 1
|
||||
|
||||
[Space(20)]
|
||||
_DistTex ("Distortion", 2D) = "white" {}
|
||||
_DistTiling ("Distortion tiling", Vector) = (1, 1, 1, 1)
|
||||
|
||||
[Space(20)]
|
||||
//_DeepColor ("Water deep color", Color) = (1, 1, 1, 1)
|
||||
_WaterHeight ("Water height", Float) = 0
|
||||
_WaterDeep ("Water deep", Float) = 0
|
||||
_WaterDepth ("Water depth param", Range(0, 0.1)) = 0
|
||||
_WaterMinAlpha ("Water min alpha", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_BorderColor ("Border color", Color) = (1, 1, 1, 1)
|
||||
_BorderWidth ("Border width", Range(0, 1)) = 0
|
||||
|
||||
[Space(20)]
|
||||
_MoveDirection ("Direction", Vector) = (0, 0, 0, 0)
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType" = "Opaque" "BW" = "TrueProbes" "LightMode" = "ForwardBase" }
|
||||
LOD 100
|
||||
Cull Off
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityLightingCommon.cginc"
|
||||
#pragma multi_compile_fog
|
||||
#pragma multi_compile LIGHTMAP_OFF LIGHTMAP_ON
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 normal : NORMAL;
|
||||
float2 uv : TEXCOORD0;
|
||||
#if LIGHTMAP_ON
|
||||
float2 lightmap_uv : TEXCOORD1;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
fixed4 worldPos : TEXCOORD1;
|
||||
fixed camHeightOverWater : TEXCOORD2;
|
||||
fixed waterDepth : TEXCOORD3;
|
||||
UNITY_FOG_COORDS(4)
|
||||
#if LIGHTMAP_ON
|
||||
fixed2 lightmap_uv : TEXCOORD5;
|
||||
#else
|
||||
fixed4 diffuseLight : TEXCOORD5;
|
||||
#endif
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
fixed4 _Color;
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
sampler2D _WaterTex;
|
||||
fixed2 _Tiling;
|
||||
fixed4 _WaterColor;
|
||||
|
||||
sampler2D _DistTex;
|
||||
fixed2 _DistTiling;
|
||||
|
||||
fixed4 _DeepColor;
|
||||
fixed _WaterHeight;
|
||||
fixed _TextureVisibility;
|
||||
fixed _WaterDeep;
|
||||
fixed _WaterDepth;
|
||||
fixed _WaterMinAlpha;
|
||||
|
||||
fixed4 _BorderColor;
|
||||
fixed _BorderWidth;
|
||||
fixed _BorderVisibility;
|
||||
|
||||
fixed3 _MoveDirection;
|
||||
|
||||
fixed4 DiffuseLight(fixed3 worldNormal)
|
||||
{
|
||||
half nl = max(0, dot(worldNormal, _WorldSpaceLightPos0.xyz));
|
||||
|
||||
fixed4 diff = nl * _LightColor0;
|
||||
diff.rgb += ShadeSH9(half4(worldNormal, 1));
|
||||
|
||||
return diff;
|
||||
}
|
||||
|
||||
fixed2 WaterPlaneUV(fixed3 worldPos, fixed camHeightOverWater)
|
||||
{
|
||||
fixed3 camToWorldRay = worldPos - _WorldSpaceCameraPos;
|
||||
fixed3 rayToWaterPlane = (camHeightOverWater / camToWorldRay.y * camToWorldRay);
|
||||
return rayToWaterPlane.xz - _WorldSpaceCameraPos.xz;
|
||||
}
|
||||
|
||||
fixed3 LightmapColor(fixed2 lightmap_uv)
|
||||
{
|
||||
fixed4 lightmapCol = UNITY_SAMPLE_TEX2D(unity_Lightmap, lightmap_uv);
|
||||
return DecodeLightmap(lightmapCol);
|
||||
}
|
||||
|
||||
fixed4 MainColor(v2f i)
|
||||
{
|
||||
fixed4 mainCol = tex2D(_MainTex, i.uv) * _Color;
|
||||
#if LIGHTMAP_ON
|
||||
mainCol.rgb *= LightmapColor(i.lightmap_uv);
|
||||
#else
|
||||
mainCol.rgb *= i.diffuseLight;
|
||||
#endif
|
||||
|
||||
return mainCol;
|
||||
}
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
|
||||
o.worldPos = mul(UNITY_MATRIX_M, v.vertex);
|
||||
o.vertex = mul(UNITY_MATRIX_VP, o.worldPos);
|
||||
|
||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||
|
||||
fixed3 camToWorldRay = o.worldPos - _WorldSpaceCameraPos;
|
||||
o.camHeightOverWater = _WorldSpaceCameraPos.y - _WaterHeight;
|
||||
|
||||
fixed3 rayToWaterPlane = o.camHeightOverWater / (-camToWorldRay.y) * camToWorldRay;
|
||||
fixed depth = length(camToWorldRay - rayToWaterPlane);
|
||||
o.waterDepth = depth * _WaterDepth * saturate(rayToWaterPlane.y - camToWorldRay.y);;
|
||||
|
||||
#if LIGHTMAP_ON
|
||||
o.lightmap_uv = v.lightmap_uv.xy * unity_LightmapST.xy + unity_LightmapST.zw;
|
||||
#else
|
||||
fixed4 worldNormal = normalize(mul(UNITY_MATRIX_M, float4(v.normal.xyz, 0)));
|
||||
o.diffuseLight = DiffuseLight(worldNormal.xyz);
|
||||
#endif
|
||||
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
|
||||
fixed3 worldPosOnPlane = _WorldSpaceCameraPos + rayToWaterPlane;
|
||||
fixed3 positionForFog = lerp(worldPosOnPlane, o.worldPos.xyz, o.worldPos.y > _WaterHeight);
|
||||
fixed4 waterVertex = mul(UNITY_MATRIX_VP, fixed4(positionForFog, 1));
|
||||
UNITY_TRANSFER_FOG(o, waterVertex);
|
||||
#endif
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed lengthUnderWater = max(0, _WaterHeight - i.worldPos.y);
|
||||
fixed underWater = lerp(0, 1, lengthUnderWater > 0);
|
||||
fixed borderAlpha = lerp(underWater * _BorderColor.a, 0, saturate(lengthUnderWater / _BorderWidth));
|
||||
fixed waterAlpha = saturate(lengthUnderWater / _WaterDeep + _WaterMinAlpha + i.waterDepth);
|
||||
|
||||
fixed4 mainCol = MainColor(i);
|
||||
|
||||
fixed2 water_uv = WaterPlaneUV(i.worldPos, i.camHeightOverWater);
|
||||
fixed4 distortion = tex2D(_DistTex, water_uv * _DistTiling) * 2 - 1;
|
||||
fixed2 distorted_uv = ((water_uv + distortion.rg) - _Time.y * _MoveDirection.xz) * _Tiling;
|
||||
|
||||
fixed4 waterCol = tex2D(_WaterTex, distorted_uv);
|
||||
waterCol = lerp(_WaterColor, fixed4(1, 1, 1, 1), waterCol.r * _TextureVisibility);
|
||||
|
||||
fixed4 finalCol = lerp(mainCol, waterCol, _WaterColor.a * waterAlpha * underWater);
|
||||
finalCol.rgb = lerp(finalCol.rgb, _BorderColor.rgb, borderAlpha);
|
||||
|
||||
UNITY_APPLY_FOG(i.fogCoord, finalCol);
|
||||
|
||||
//return fixed4(reflection, 0, 0, 1);
|
||||
return finalCol;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43be516172fe7624da4ca48a036caaf5
|
||||
timeCreated: 1493134247
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 89541
|
||||
packageName: Mobile depth water shader
|
||||
packageVersion: 1.0
|
||||
assetPath: Assets/MobileDepthWater/Shaders/WaterTwoSide/Depth/DiffuseDepthWaterTwoSide.shader
|
||||
uploadId: 179707
|
||||
9
Assets/MobileDepthWater/Shaders/WaterTwoSide/Height.meta
Normal file
9
Assets/MobileDepthWater/Shaders/WaterTwoSide/Height.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f35b01f87496ec42b68244883e69638
|
||||
folderAsset: yes
|
||||
timeCreated: 1493418171
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user