浏览代码

fix shader errors from merge

/feature-infinite-sea
Andre McGrail 4 年前
当前提交
406d9439
共有 4 个文件被更改,包括 146 次插入42 次删除
  1. 180
      Assets/scenes/Testing/InfiniteWater.unity
  2. 2
      Packages/com.verasl.water-system/Shaders/InfiniteWater.shader
  3. 2
      Packages/com.verasl.water-system/Shaders/WaterCommon.hlsl
  4. 4
      Packages/com.verasl.water-system/Shaders/WaterLighting.hlsl

180
Assets/scenes/Testing/InfiniteWater.unity


m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 322090437}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1001 &337970705
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8993800107570090065, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8994039904032558531, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8994085050065515947, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8994587504260833689, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8994604808859007103, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8995542815361017601, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8995611058222461145, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_LocalPosition.x
value: -3.69
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.09
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_LocalPosition.z
value: 24.27
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9080735299852188497, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9083998436884223129, guid: 405c4bc591de844a3a100e1538790229,
type: 3}
propertyPath: m_Name
value: _Interceptor
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 405c4bc591de844a3a100e1538790229, type: 3}
--- !u!1 &341762015
GameObject:
m_ObjectHideFlags: 0

- {fileID: 341762016}
- {fileID: 322090438}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &611616626
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 5
--- !u!84 &915593709
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: WaterDepthMap
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 3
m_Width: 1024
m_Height: 1024
m_AntiAliasing: 1
m_MipCount: -1
m_DepthFormat: 2
m_ColorFormat: 142
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!28 &952346665
Texture2D:
m_ObjectHideFlags: 0

m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_Version: 2
--- !u!84 &1705656474
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: WaterDepthMap
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 3
m_Width: 1024
m_Height: 1024
m_AntiAliasing: 1
m_MipCount: -1
m_DepthFormat: 2
m_ColorFormat: 142
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
--- !u!1001 &2012797122
PrefabInstance:
m_ObjectHideFlags: 0

2
Packages/com.verasl.water-system/Shaders/InfiniteWater.shader


float3 cameraOffset = GetCameraPositionWS();
//input.positionOS.y *= abs(cameraOffset.y) + 1;
cameraOffset.y *= 0.0;
cameraOffset.y -= 25.0;
VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz + cameraOffset);
output.positionCS = vertexInput.positionCS;
output.screenPosition = ComputeScreenPos(vertexInput.positionCS);

2
Packages/com.verasl.water-system/Shaders/WaterCommon.hlsl


{
float3 camPos = GetCameraPositionWS();
camPos.y = 0;
return 1 - saturate((distance(positionWS, camPos) - 50) * 1);
return 1 - saturate((distance(positionWS, camPos) - 50) * 0.1);
}
///////////////////////////////////////////////////////////////////////////////

4
Packages/com.verasl.water-system/Shaders/WaterLighting.hlsl


}
//Soft Shadows
half SoftShadows(float3 screenUV, float3 positionWS, half3 viewDir, half depth)
half SoftShadows(float2 screenUV, float3 positionWS, half3 viewDir, half depth)
half2 jitterUV = screenUV.xy * _ScreenParams.xy * _DitherPattern_TexelSize.xy;
half2 jitterUV = screenUV * _ScreenParams.xy * _DitherPattern_TexelSize.xy;
half shadowAttenuation = 0;
float loopDiv = 1.0 / SHADOW_ITERATIONS;

正在加载...
取消
保存