浏览代码

Updated manifest and delayed Depthmap creation as it was causing a crash

/main
André McGrail 4 年前
当前提交
27578bfb
共有 3 个文件被更改,包括 5 次插入7 次删除
  1. 4
      Packages/com.verasl.water-system/Scripts/Water.cs
  2. 2
      Packages/com.verasl.water-system/Shaders/WaterCommon.hlsl
  3. 6
      Packages/manifest.json

4
Packages/com.verasl.water-system/Scripts/Water.cs


private static readonly int AbsorptionScatteringRamp = Shader.PropertyToID("_AbsorptionScatteringRamp");
private static readonly int DepthCamZParams = Shader.PropertyToID("_VeraslWater_DepthCamParams");
private void OnValidate() { Init(); }
private void OnEnable()
{
if (!computeOverride)

{
resources = Resources.Load("WaterResources") as WaterResources;
}
CaptureDepthMap();
Invoke(nameof(CaptureDepthMap), 1.0f);
}
private void LateUpdate()

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


// shallows mask
half waterDepth = WaterTextureDepth(input.posWS);
input.posWS.y += saturate((-waterDepth + 1.5) * 0.4);
input.posWS.y += pow(saturate((-waterDepth + 1.5) * 0.4), 2);
//Gerstner here
WaveStruct wave;

6
Packages/manifest.json


"com.unity.ide.vscode": "1.1.4",
"com.unity.inputsystem": "1.0.0-preview.4",
"com.unity.mathematics": "1.1.0",
"com.unity.memoryprofiler": "0.2.0-preview.1",
"com.unity.memoryprofiler": "0.2.1-preview.1",
"com.unity.terrain-tools": "3.0.0-preview",
"com.unity.textmeshpro": "2.1.0-preview.3",
"com.unity.terrain-tools": "3.0.1-preview",
"com.unity.textmeshpro": "2.1.0-preview.4",
"com.unity.timeline": "1.2.11",
"com.unity.ugui": "1.0.0",
"net.peeweek.gameplay-ingredients": "https://github.com/peeweek/net.peeweek.gameplay-ingredients.git#2019.3.0",

正在加载...
取消
保存