浏览代码

removed water system to make way for Submodule

/main
Andre McGrail 7 年前
当前提交
15127cdc
共有 10 个文件被更改,包括 108 次插入95 次删除
  1. 169
      Assets/scenes/Island.unity
  2. 8
      WaterSystem/PlanarReflection.cs
  3. 6
      WaterSystem/Sea.mat
  4. 2
      WaterSystem/Shaders/Water.shader
  5. 8
      WaterSystem/Shaders/WaterLighting.hlsl
  6. 2
      WaterSystem/Shaders/WaterTessellated.shader
  7. 8
      Assets/scenes/Island/OcclusionCullingData.asset.meta
  8. 0
      /WaterSystem.meta
  9. 0
      /WaterSystem

169
Assets/scenes/Island.unity


smallestOccluder: 4
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
m_SceneGUID: e49366a21c3d84388bfb33016c0e77e2
m_OcclusionCullingData: {fileID: 36300000, guid: c50beb49de97543d9986b239981f6b8b,
type: 2}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0

m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: b92151ed482ed45ef84412410142f938, type: 2}
m_IsPrefabParent: 0
--- !u!28 &25175827
Texture2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 128
m_Height: 1
m_CompleteImageSize: 512
m_TextureFormat: 5
m_MipCount: 1
m_IsReadable: 1
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_LightmapFormat: 0
m_ColorSpace: 1
image data: 512
_typelessdata: ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000018ff000031ff00004bff000064ff00007dff000096ff0000b0ff0000c9ff0000e2ff0000fbff0005fbff000cf7ff0012f3ff0019eeff001feaff0025e5ff002ce1ff0032ddff0038d8ff003fd4ff0045d0ff004ccbff0052c7ff0058c3ff005fbeff0065baff006bb5ff0072b1ff0078adff007ea8ff0085a4ff008ba0ff00929bff009897ff009e93ff00a58eff00ab8aff00b185ff00b881ff00be7dff00c578ff00cb74ff00d170ff00d86bff00de67ff00e463ff00eb5eff00f15aff00f855ff00fe51ff15f54aff2fea42ff49de39ff63d231ff7cc629ff96bb21ffb0af19ffc9a311ffe39809fffd8c01ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00
m_StreamData:
offset: 0
size: 0
path:
--- !u!1001 &32826906
Prefab:
m_ObjectHideFlags: 0

m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!28 &104386530
Texture2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 128
m_Height: 2
m_CompleteImageSize: 1024
m_TextureFormat: 5
m_MipCount: 1
m_IsReadable: 1
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_LightmapFormat: 0
m_ColorSpace: 1
image data: 1024
_typelessdata: ffbcb696ffa3b08eff8aa987ff7ea685ff7aa587ff75a488ff70a48aff6ca38bff67a38dff62a28eff5ea18fff59a191ff55a092ff50a094ff4b9f95ff479f97ff429e98ff3d9d99ff399d9bff359c9cff349b9bff339b9aff329a9aff319999ff2f9898ff2e9898ff2d9797ff2c9697ff2b9596ff2a9495ff289495ff279394ff269294ff259193ff249192ff229092ff218f91ff208e91ff1f8e90ff1e8d8fff1c8c8fff1b8b8eff1a8b8dff198a8dff18898cff17888cff15888bff14878aff13868aff128589ff118489ff0f8488ff0e8387ff0d8287ff0c8186ff0b8186ff098085ff087f84ff077e84ff067e83ff057d82ff047c82ff027b81ff017b81ff007a80ff007980ff00787fff00777fff00767eff00757eff00747eff00747dff00737dff00727dff00717cff00707cff006f7bff006e7bff006d7bff006c7aff006b7aff006b79ff006a79ff006979ff006878ff006778ff006678ff006577ff006477ff006376ff006376ff006276ff006175ff006075ff005f74ff005e74ff005d74ff005c73ff005b73ff005a73ff005a72ff005972ff005871ff005771ff005671ff005570ff005470ff005370ff00526fff00526fff00516eff00506eff004f6eff004e6dff004d6dff004c6cff004b6cff004a6cff00496bff00496bff00486bff00476aff00466aff004569ff004469ff004369ff004268ff004168ff000000ff010201ff030302ff040503ff060604ff070805ff090906ff0a0b07ff0c0c08ff0d0e09ff0f0f0aff10110bff12130cff13140dff15160eff16170fff181910ff191a10ff1b1c11ff1c1d12ff1e1f13ff1f2014ff212215ff222416ff232517ff252718ff262819ff282a1aff292b1bff2b2d1cff2c2e1dff2e301eff2e311fff2e3220ff2e3221ff2e3322ff2e3423ff2e3424ff2e3525ff2e3626ff2e3727ff2e3728ff2e3829ff2e392aff2e3a2bff2e3a2cff2e3b2eff2e3c2fff2e3d30ff2e3d31ff2e3e32ff2e3f33ff2e4034ff2e4035ff2e4136ff2e4237ff2e4338ff2e4339ff2e443aff2e453bff2e453cff2e463dff2e473eff2e483fff2e4840ff2e4941ff2e4a42ff2e4b43ff2e4b44ff2d4c45ff2d4d46ff2d4e47ff2d4e48ff2d4f49ff2d504aff2d514bff2d514cff2d524dff2d534eff2d544fff2d5451ff2d5552ff2d5653ff2d5654ff2d5755ff2d5856ff2d5957ff2d5958ff2d5a59ff2d5b5aff2d5c5bff2d5c5cff2d5d5dff2d5e5eff2d5f5fff2d5f60ff2d6061ff2d6162ff2d6263ff2d6264ff2d6365ff2d6466ff2d6567ff2d6568ff2d6669ff2d676aff2d676bff2d686cff2d696dff2d6a6eff2d6a6fff2d6b70ff2d6c71ff2d6d72ff2d6d73ff2d6e75ff2d6f76ff2d7077ff2d7078ff2d7179ff2d727aff2d737bff2d737cff2d747dff2d757eff2d767fff2d7680ff2d7781
m_StreamData:
offset: 0
size: 0
path:
--- !u!1 &105380728
GameObject:
m_ObjectHideFlags: 0

m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 153441711}
m_LocalRotation: {x: 0.061685864, y: -0.8048554, z: 0.08499839, w: 0.58410436}
m_LocalRotation: {x: 0.061684627, y: -0.8048548, z: 0.08499778, w: 0.58410543}
m_LocalPosition: {x: -64.48244, y: 7.422699, z: -114.538864}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

objectReference: {fileID: 0}
- target: {fileID: 1553288845585282, guid: fc3ffb83d6eafb1489a5b23bc82d25b6, type: 2}
propertyPath: m_IsActive
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114129291822198474, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 2}

m_PrefabParentObject: {fileID: 4759700577955508, guid: 851454441f29b4ab9a78308458eafccb,
type: 2}
m_PrefabInternal: {fileID: 621579106}
--- !u!28 &628442205
Texture2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 128
m_Height: 1
m_CompleteImageSize: 512
m_TextureFormat: 5
m_MipCount: 1
m_IsReadable: 1
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_LightmapFormat: 0
m_ColorSpace: 1
image data: 512
_typelessdata: ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000018ff000031ff00004bff000064ff00007dff000096ff0000b0ff0000c9ff0000e2ff0000fbff0005fbff000cf7ff0012f3ff0019eeff001feaff0025e5ff002ce1ff0032ddff0038d8ff003fd4ff0045d0ff004ccbff0052c7ff0058c3ff005fbeff0065baff006bb5ff0072b1ff0078adff007ea8ff0085a4ff008ba0ff00929bff009897ff009e93ff00a58eff00ab8aff00b185ff00b881ff00be7dff00c578ff00cb74ff00d170ff00d86bff00de67ff00e463ff00eb5eff00f15aff00f855ff00fe51ff15f54aff2fea42ff49de39ff63d231ff7cc629ff96bb21ffb0af19ffc9a311ffe39809fffd8c01ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00ffff8b00
m_StreamData:
offset: 0
size: 0
path:
--- !u!1 &636757617
GameObject:
m_ObjectHideFlags: 3

objectReference: {fileID: 0}
- target: {fileID: 1553288845585282, guid: fc3ffb83d6eafb1489a5b23bc82d25b6, type: 2}
propertyPath: m_IsActive
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114129291822198474, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 2}

m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1017609894}
m_LocalRotation: {x: 0.061685864, y: -0.8048554, z: 0.08499839, w: 0.58410436}
m_LocalRotation: {x: 0.061684627, y: -0.8048548, z: 0.08499778, w: 0.58410543}
m_LocalPosition: {x: -64.48244, y: 7.422699, z: -114.538864}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []

objectReference: {fileID: 0}
- target: {fileID: 1553288845585282, guid: fc3ffb83d6eafb1489a5b23bc82d25b6, type: 2}
propertyPath: m_IsActive
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114129291822198474, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 2}

m_PrefabParentObject: {fileID: 4036952117179152, guid: b92151ed482ed45ef84412410142f938,
type: 2}
m_PrefabInternal: {fileID: 1287051420}
--- !u!28 &1113805500
Texture2D:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 128
m_Height: 2
m_CompleteImageSize: 1024
m_TextureFormat: 5
m_MipCount: 1
m_IsReadable: 1
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_LightmapFormat: 0
m_ColorSpace: 1
image data: 1024
_typelessdata: ffbcb696ffa3b08eff8aa987ff7ea685ff7aa587ff75a488ff70a48aff6ca38bff67a38dff62a28eff5ea18fff59a191ff55a092ff50a094ff4b9f95ff479f97ff429e98ff3d9d99ff399d9bff359c9cff349b9bff339b9aff329a9aff319999ff2f9898ff2e9898ff2d9797ff2c9697ff2b9596ff2a9495ff289495ff279394ff269294ff259193ff249192ff229092ff218f91ff208e91ff1f8e90ff1e8d8fff1c8c8fff1b8b8eff1a8b8dff198a8dff18898cff17888cff15888bff14878aff13868aff128589ff118489ff0f8488ff0e8387ff0d8287ff0c8186ff0b8186ff098085ff087f84ff077e84ff067e83ff057d82ff047c82ff027b81ff017b81ff007a80ff007980ff00787fff00777fff00767eff00757eff00747eff00747dff00737dff00727dff00717cff00707cff006f7bff006e7bff006d7bff006c7aff006b7aff006b79ff006a79ff006979ff006878ff006778ff006678ff006577ff006477ff006376ff006376ff006276ff006175ff006075ff005f74ff005e74ff005d74ff005c73ff005b73ff005a73ff005a72ff005972ff005871ff005771ff005671ff005570ff005470ff005370ff00526fff00526fff00516eff00506eff004f6eff004e6dff004d6dff004c6cff004b6cff004a6cff00496bff00496bff00486bff00476aff00466aff004569ff004469ff004369ff004268ff004168ff000000ff010201ff030302ff040503ff060604ff070805ff090906ff0a0b07ff0c0c08ff0d0e09ff0f0f0aff10110bff12130cff13140dff15160eff16170fff181910ff191a10ff1b1c11ff1c1d12ff1e1f13ff1f2014ff212215ff222416ff232517ff252718ff262819ff282a1aff292b1bff2b2d1cff2c2e1dff2e301eff2e311fff2e3220ff2e3221ff2e3322ff2e3423ff2e3424ff2e3525ff2e3626ff2e3727ff2e3728ff2e3829ff2e392aff2e3a2bff2e3a2cff2e3b2eff2e3c2fff2e3d30ff2e3d31ff2e3e32ff2e3f33ff2e4034ff2e4035ff2e4136ff2e4237ff2e4338ff2e4339ff2e443aff2e453bff2e453cff2e463dff2e473eff2e483fff2e4840ff2e4941ff2e4a42ff2e4b43ff2e4b44ff2d4c45ff2d4d46ff2d4e47ff2d4e48ff2d4f49ff2d504aff2d514bff2d514cff2d524dff2d534eff2d544fff2d5451ff2d5552ff2d5653ff2d5654ff2d5755ff2d5856ff2d5957ff2d5958ff2d5a59ff2d5b5aff2d5c5bff2d5c5cff2d5d5dff2d5e5eff2d5f5fff2d5f60ff2d6061ff2d6162ff2d6263ff2d6264ff2d6365ff2d6466ff2d6567ff2d6568ff2d6669ff2d676aff2d676bff2d686cff2d696dff2d6a6eff2d6a6fff2d6b70ff2d6c71ff2d6d72ff2d6d73ff2d6e75ff2d6f76ff2d7077ff2d7078ff2d7179ff2d727aff2d737bff2d737cff2d747dff2d757eff2d767fff2d7680ff2d7781
m_StreamData:
offset: 0
size: 0
path:
--- !u!1001 &1116068033
Prefab:
m_ObjectHideFlags: 0

propertyPath: m_DynamicOccludee
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1015499191777110, guid: 2cac2e60f3f6f2447ad9b550450f60ed, type: 2}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 23417954490615130, guid: 2cac2e60f3f6f2447ad9b550450f60ed, type: 2}
- {fileID: 33110715006230082, guid: 2cac2e60f3f6f2447ad9b550450f60ed, type: 2}

m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_StaticEditorFlags: 125
m_IsActive: 1
--- !u!154 &2118583900
TerrainCollider:

8
WaterSystem/PlanarReflection.cs


// camera. We render reflections and do other updates here.
// Because the script executes in edit mode, reflections for the scene view
// camera will just work!
public void OnWillRenderObject()
public void Update()
var rend = GetComponent<Renderer>();
if (!enabled || !rend || !rend.enabled)
return;
// var rend = GetComponent<Renderer>();
// if (!enabled || !rend || !rend.enabled)
// return;
Camera cam = Camera.current;
if (!cam)

6
WaterSystem/Sea.mat


m_PrefabInternal: {fileID: 0}
m_Name: Sea
m_Shader: {fileID: 4800000, guid: a94edd303261140cf9e6ce8c90d7a99a, type: 3}
m_ShaderKeywords: GERSTNER_WAVES _DEBUGPASS_TEMPORARY _NORMALMAP _PERF_COL _PERF_DEPTH
m_ShaderKeywords: GERSTNER_WAVES _DEBUGPASS_NORMALS _NORMALMAP _PERF_COL _PERF_DEPTH
m_CustomRenderQueue: -1
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses:
- PASS 0

- _BumpValue: 0.5
- _Cutoff: 0.5
- _Debug: 0
- _DebugPass: 8
- _DebugPass: 5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _FragWaves: 0

2
WaterSystem/Shaders/Water.shader


}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline" = "LightweightPipeline" }
Tags { "RenderType"="Transparent" "Queue"="Transparent-500" "RenderPipeline" = "LightweightPipeline" }
LOD 300
ZWrite Off

8
WaterSystem/Shaders/WaterLighting.hlsl


//create view normal
half3 viewNormal = mul( UNITY_MATRIX_V, float4(normalWS,0) ).xyz;
//calculate screen-spaced UV offset for planar reflections
refOffset.x = viewNormal.x * 0.05;
refOffset.y = dot(viewDir, normalWS) * 0.25;
half rimFade = (1-fresnelTerm) - 0.5;//value to smooth out reflection distortion on glancing/distant angles
refOffset.x = viewNormal.x * 0.025;
refOffset.y = dot(viewDir, normalWS) * 0.15;
//half rimFade = (1-fresnelTerm) - 0.5;//value to smooth out reflection distortion on glancing/distant angles
half2 reflectionUV = screenUV + refOffset;// * rimFade;
half2 reflectionUV = screenUV + refOffset; // * rimFade;
reflection += _PlanarReflectionTexture.SampleLevel(sampler_PlanarReflectionTexture, reflectionUV, 6 * roughness).rgb;//planar reflection
#endif
//do backup

2
WaterSystem/Shaders/WaterTessellated.shader


}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" "RenderPipeline" = "LightweightPipeline" }
Tags { "RenderType"="Transparent" "Queue"="Transparent-500" "RenderPipeline" = "LightweightPipeline" }
LOD 300
ZWrite Off

8
Assets/scenes/Island/OcclusionCullingData.asset.meta


fileFormatVersion: 2
guid: c50beb49de97543d9986b239981f6b8b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 36300000
userData:
assetBundleName:
assetBundleVariant:

/Assets/WaterSystem.meta → /WaterSystem.meta

/Assets/WaterSystem → /WaterSystem

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存