修改浮漂和绳子逻辑
This commit is contained in:
Binary file not shown.
@@ -41,37 +41,23 @@ MonoBehaviour:
|
||||
- Assembly-CSharp
|
||||
- Assembly-CSharp-firstpass
|
||||
- Cinemachine
|
||||
- CrestDWP2Asmdef
|
||||
- ECM2
|
||||
- Enviro3.Runtime
|
||||
- FairyGUI
|
||||
- Fantasy.Unity
|
||||
- Gaia.UnityURPWater.Core
|
||||
- GaiaCore
|
||||
- Gena.Scripts.Utils
|
||||
- Ilumisoft.GraphicsControl
|
||||
- Ilumisoft.GraphicsControl.BuiltIn
|
||||
- Ilumisoft.GraphicsControl.UI
|
||||
- Ilumisoft.GraphicsControl.URP
|
||||
- JBooth.MicroSplat.Core
|
||||
- JBooth.MicroVerseCore
|
||||
- JBooth.MicroVerseCore.Demo
|
||||
- JBooth.MicroVerseCore.Demo.TimeOfDay.Runtime
|
||||
- JBooth.MicroVerseCore.Roads.Demo
|
||||
- KAnimationCore.Runtime
|
||||
- Luban.Runtime
|
||||
- NBC.Asset
|
||||
- NBC.Core
|
||||
- NBC.Lan
|
||||
- NBC.UI
|
||||
- NWH.Common
|
||||
- NWH.DWP2
|
||||
- OccaSoftware.SuperSimpleSkybox.Demo
|
||||
- OccaSoftware.SuperSimpleSkybox.Runtime
|
||||
- ProceduralWorlds.GTS.MeshSimplifier
|
||||
- Rowlan.MicroVerse.Presets.Runtime
|
||||
- Rowlan.MicroVerse.Presets_2.Runtime
|
||||
- Rowlan.MicroVerse.Presets_3.Runtime
|
||||
- StompyRobot.SRDebugger
|
||||
- StompyRobot.SRF
|
||||
- Unity.InputSystem.RebindingUI
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -85,6 +85,12 @@ public class Rope : MonoBehaviour
|
||||
[SerializeField, Range(1, 8), Tooltip("每隔多少次FixedUpdate更新一次水面约束")]
|
||||
private int waterUpdateEvery = 1;
|
||||
|
||||
[SerializeField, Range(0f, 1f), Tooltip("水面约束抬升强度(每次更新的插值强度),越小越渐进")]
|
||||
private float waterLiftStrength = 0.25f;
|
||||
|
||||
[SerializeField, Tooltip("startAnchor 在水下时,让其相邻端节点强制跟随 startAnchor,避免被抬到水面导致脱离")]
|
||||
private bool keepStartAdjacentNodeFollow = true;
|
||||
|
||||
[SerializeField, Range(0, 8), Tooltip("水面约束后,再做几次长度约束,减少局部折角")]
|
||||
private int waterPostConstraintIterations = 2;
|
||||
|
||||
@@ -201,6 +207,7 @@ public class Rope : MonoBehaviour
|
||||
waterSampleStep = Mathf.Max(1, waterSampleStep);
|
||||
waterUpdateEvery = Mathf.Max(1, waterUpdateEvery);
|
||||
waterSurfaceOffset = Mathf.Max(0f, waterSurfaceOffset);
|
||||
waterLiftStrength = Mathf.Clamp01(waterLiftStrength);
|
||||
waterPostConstraintIterations = Mathf.Clamp(waterPostConstraintIterations, 0, 8);
|
||||
}
|
||||
|
||||
@@ -630,16 +637,18 @@ public class Rope : MonoBehaviour
|
||||
|
||||
int step = Mathf.Max(1, waterSampleStep);
|
||||
float surfaceY = waterLevelY + waterSurfaceOffset;
|
||||
bool startUnderWater = _pCurr[0].y < surfaceY;
|
||||
int startAdjacentIdx = GetStartAdjacentNodeIndex(last);
|
||||
|
||||
int prevSampleIdx = 1;
|
||||
float prevSurfaceY = surfaceY;
|
||||
|
||||
ApplyWaterSurface(prevSampleIdx, prevSurfaceY);
|
||||
ApplyWaterSurface(prevSampleIdx, prevSurfaceY, startUnderWater, startAdjacentIdx);
|
||||
|
||||
for (int i = 1 + step; i < last; i += step)
|
||||
{
|
||||
float nextSurfaceY = surfaceY;
|
||||
ApplyWaterSurface(i, nextSurfaceY);
|
||||
ApplyWaterSurface(i, nextSurfaceY, startUnderWater, startAdjacentIdx);
|
||||
|
||||
if (waterInterpolate)
|
||||
{
|
||||
@@ -651,13 +660,13 @@ public class Rope : MonoBehaviour
|
||||
int idx = a + j;
|
||||
float t = j / (float)span;
|
||||
float y = Mathf.Lerp(prevSurfaceY, nextSurfaceY, t);
|
||||
ApplyWaterSurface(idx, y);
|
||||
ApplyWaterSurface(idx, y, startUnderWater, startAdjacentIdx);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int idx = prevSampleIdx + 1; idx < i; idx++)
|
||||
ApplyWaterSurface(idx, prevSurfaceY);
|
||||
ApplyWaterSurface(idx, prevSurfaceY, startUnderWater, startAdjacentIdx);
|
||||
}
|
||||
|
||||
prevSampleIdx = i;
|
||||
@@ -665,20 +674,38 @@ public class Rope : MonoBehaviour
|
||||
}
|
||||
|
||||
for (int i = prevSampleIdx + 1; i < last; i++)
|
||||
ApplyWaterSurface(i, prevSurfaceY);
|
||||
ApplyWaterSurface(i, prevSurfaceY, startUnderWater, startAdjacentIdx);
|
||||
}
|
||||
|
||||
private void ApplyWaterSurface(int i, float surfaceY)
|
||||
private int GetStartAdjacentNodeIndex(int last)
|
||||
{
|
||||
if (last <= 1) return 1;
|
||||
|
||||
Vector3 s = _pCurr[0];
|
||||
float d1 = (_pCurr[1] - s).sqrMagnitude;
|
||||
float d2 = (_pCurr[last - 1] - s).sqrMagnitude;
|
||||
return d1 <= d2 ? 1 : last - 1;
|
||||
}
|
||||
|
||||
private void ApplyWaterSurface(int i, float surfaceY, bool startUnderWater, int startAdjacentIdx)
|
||||
{
|
||||
if (keepStartAdjacentNodeFollow && startUnderWater && i == startAdjacentIdx)
|
||||
{
|
||||
Vector3 s = _pCurr[0];
|
||||
_pCurr[i] = s;
|
||||
_pPrev[i] = s;
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3 p = _pCurr[i];
|
||||
if (p.y < surfaceY)
|
||||
{
|
||||
p.y = surfaceY;
|
||||
p.y = Mathf.Lerp(p.y, surfaceY, waterLiftStrength);
|
||||
_pCurr[i] = p;
|
||||
|
||||
// 同步 prev,杀掉向下惯性,避免反复穿透水面
|
||||
// 渐进同步 prev,削弱向下惯性,避免反复穿透水面
|
||||
Vector3 prev = _pPrev[i];
|
||||
if (prev.y < surfaceY) prev.y = surfaceY;
|
||||
if (prev.y < p.y) prev.y = Mathf.Lerp(prev.y, p.y, waterLiftStrength);
|
||||
_pPrev[i] = prev;
|
||||
}
|
||||
}
|
||||
@@ -798,4 +825,4 @@ public class Rope : MonoBehaviour
|
||||
for (int i = 0; i < _physicsNodes; i++)
|
||||
Gizmos.DrawSphere(_pCurr[i], 0.01f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
using WaveHarmonic.Crest;
|
||||
|
||||
/// <summary>
|
||||
/// 简单水面接口。你可以替换成自己的水系统。
|
||||
/// </summary>
|
||||
@@ -26,10 +28,10 @@ public enum BobberControlMode
|
||||
public enum BobberBiteType
|
||||
{
|
||||
None,
|
||||
Tap, // 轻点
|
||||
SlowSink, // 缓沉
|
||||
Lift, // 送漂
|
||||
BlackDrift // 黑漂/快速拖入
|
||||
Tap, // 轻点
|
||||
SlowSink, // 缓沉
|
||||
Lift, // 送漂
|
||||
BlackDrift // 黑漂/快速拖入
|
||||
}
|
||||
|
||||
public enum BobberPosture
|
||||
@@ -43,135 +45,106 @@ public enum BobberPosture
|
||||
[RequireComponent(typeof(Rigidbody))]
|
||||
public class BobberPresentationController : MonoBehaviour
|
||||
{
|
||||
[Header("Water")]
|
||||
[Tooltip("没有水提供器时使用固定水位")]
|
||||
[Header("Water")] [Tooltip("没有水提供器时使用固定水位")]
|
||||
public float fallbackWaterLevel = 0f;
|
||||
|
||||
[Tooltip("Crest 水体。为空时会尝试从 SceneSettings 读取")]
|
||||
public WaterRenderer waterRenderer;
|
||||
|
||||
[Tooltip("Crest 查询层级")] public CollisionLayer waterCollisionLayer = CollisionLayer.AfterAnimatedWaves;
|
||||
|
||||
[Tooltip("Crest 波面查询宽度(参考 BobberFloating)")]
|
||||
public float waterQueryObjectWidth = 0.5f;
|
||||
|
||||
[Tooltip("可选:挂实现了 IWaterSurfaceProvider 的组件")]
|
||||
public MonoBehaviour waterProviderBehaviour;
|
||||
|
||||
[Header("Enter Water")]
|
||||
[Tooltip("底部进入水面多少米后切换为漂像控制")]
|
||||
[Header("Enter Water")] [Tooltip("底部进入水面多少米后切换为漂像控制")]
|
||||
public float enterWaterDepth = 0.002f;
|
||||
|
||||
[Tooltip("离开水面多少米后回到空中物理。一般给负值做滞回")]
|
||||
public float exitWaterDepth = -0.01f;
|
||||
[Tooltip("离开水面多少米后回到空中物理。一般给负值做滞回")] public float exitWaterDepth = -0.01f;
|
||||
|
||||
[Header("Geometry")]
|
||||
[Tooltip("浮漂总高度(米)")]
|
||||
[Header("Geometry")] [Tooltip("浮漂总高度(米)")]
|
||||
public float floatHeight = 0.08f;
|
||||
|
||||
[Tooltip("如果 Pivot 在浮漂底部,这里填 0;如果 Pivot 在模型中心,就填底部相对 Pivot 的本地 Y")]
|
||||
public float bottomOffsetLocalY = 0f;
|
||||
|
||||
[Header("Base Float")]
|
||||
[Tooltip("基础吃铅比例,决定静止时有多少在水下")]
|
||||
[Range(0.05f, 0.95f)]
|
||||
[Header("Base Float")] [Tooltip("基础吃铅比例,决定静止时有多少在水下")] [Range(0.05f, 0.95f)]
|
||||
public float baseSubmergeRatio = 0.28f;
|
||||
|
||||
[Tooltip("Y 轴平滑时间,越小响应越快")]
|
||||
public float ySmoothTime = 0.08f;
|
||||
[Tooltip("Y 轴平滑时间,越小响应越快")] public float ySmoothTime = 0.08f;
|
||||
|
||||
[Tooltip("最大竖直速度限制(用于 SmoothDamp)")]
|
||||
public float maxYSpeed = 2f;
|
||||
[Tooltip("最大竖直速度限制(用于 SmoothDamp)")] public float maxYSpeed = 2f;
|
||||
|
||||
[Tooltip("静止小死区,减少微抖")]
|
||||
public float yDeadZone = 0.0005f;
|
||||
[Tooltip("静止小死区,减少微抖")] public float yDeadZone = 0.0005f;
|
||||
|
||||
[Header("Surface Motion")]
|
||||
[Tooltip("是否启用轻微水面起伏")]
|
||||
[Header("Surface Motion")] [Tooltip("是否启用轻微水面起伏")]
|
||||
public bool enableSurfaceBobbing = true;
|
||||
|
||||
[Tooltip("水面轻微起伏振幅(米)")]
|
||||
public float surfaceBobAmplitude = 0.0015f;
|
||||
[Tooltip("水面轻微起伏振幅(米)")] public float surfaceBobAmplitude = 0.0015f;
|
||||
|
||||
[Tooltip("水面轻微起伏频率")]
|
||||
public float surfaceBobFrequency = 1.2f;
|
||||
[Tooltip("水面轻微起伏频率")] public float surfaceBobFrequency = 1.2f;
|
||||
|
||||
[Header("XZ Motion")]
|
||||
[Tooltip("入水后是否锁定 XZ 到入水点附近")]
|
||||
[Header("XZ Motion")] [Tooltip("入水后是否锁定 XZ 到入水点附近")]
|
||||
public bool lockXZAroundAnchor = true;
|
||||
|
||||
[Tooltip("XZ 跟随平滑时间")]
|
||||
public float xzSmoothTime = 0.15f;
|
||||
[Tooltip("XZ 跟随平滑时间")] public float xzSmoothTime = 0.15f;
|
||||
|
||||
[Tooltip("水流/拖拽带来的额外平面偏移最大值")]
|
||||
public float maxPlanarOffset = 0.15f;
|
||||
[Tooltip("水流/拖拽带来的额外平面偏移最大值")] public float maxPlanarOffset = 0.15f;
|
||||
|
||||
[Header("Sink By Weight / Tension")]
|
||||
[Tooltip("外部向下拉力映射为下沉量的系数。你可以把钩/铅/线组的等效向下拉力喂进来")]
|
||||
[Header("Sink By Weight / Tension")] [Tooltip("外部向下拉力映射为下沉量的系数。你可以把钩/铅/线组的等效向下拉力喂进来")]
|
||||
public float downForceToSink = 0.0025f;
|
||||
|
||||
[Tooltip("向下拉力下沉的最大附加量")]
|
||||
public float maxExtraSink = 0.08f;
|
||||
[Tooltip("向下拉力下沉的最大附加量")] public float maxExtraSink = 0.08f;
|
||||
|
||||
[Header("Bottom Touch")]
|
||||
[Tooltip("触底时是否启用修正")]
|
||||
[Header("Bottom Touch")] [Tooltip("触底时是否启用修正")]
|
||||
public bool enableBottomTouchAdjust = true;
|
||||
|
||||
[Tooltip("触底后减少的下沉量(例如铅坠到底,漂会回升一点)")]
|
||||
public float bottomTouchLift = 0.01f;
|
||||
[Tooltip("触底后减少的下沉量(例如铅坠到底,漂会回升一点)")] public float bottomTouchLift = 0.01f;
|
||||
|
||||
[Header("Posture Source")]
|
||||
[Tooltip("下方 Lure / 钩组 / 铅坠的刚体。姿态主要根据它和浮漂的相对位置判断")]
|
||||
[Header("Posture Source")] [Tooltip("下方 Lure / 钩组 / 铅坠的刚体。姿态主要根据它和浮漂的相对位置判断")]
|
||||
public Rigidbody lureBody;
|
||||
|
||||
[Tooltip("用于归一化的参考长度。一般填:浮漂到 Lure 在“正常拉直”时的大致长度")]
|
||||
public float referenceLength = 0.30f;
|
||||
|
||||
[Header("Posture Threshold")]
|
||||
[Tooltip("最小入水比例。不够时优先躺漂")]
|
||||
[Header("Posture Threshold")] [Tooltip("最小入水比例。不够时优先躺漂")]
|
||||
public float minSubmergeToStand = 0.16f;
|
||||
|
||||
[Tooltip("垂直分量比低于该值时,优先躺漂")]
|
||||
public float verticalLieThreshold = 0.18f;
|
||||
[Tooltip("垂直分量比低于该值时,优先躺漂")] public float verticalLieThreshold = 0.18f;
|
||||
|
||||
[Tooltip("垂直分量比高于该值,且水平分量较小时,允许立漂")]
|
||||
public float verticalUprightThreshold = 0.75f;
|
||||
[Tooltip("垂直分量比高于该值,且水平分量较小时,允许立漂")] public float verticalUprightThreshold = 0.75f;
|
||||
|
||||
[Tooltip("水平分量比高于该值时,不允许完全立漂")]
|
||||
public float planarTiltThreshold = 0.30f;
|
||||
[Tooltip("水平分量比高于该值时,不允许完全立漂")] public float planarTiltThreshold = 0.30f;
|
||||
|
||||
[Tooltip("水平分量明显大于垂直分量时,优先躺漂")]
|
||||
public float planarDominanceMultiplier = 1.20f;
|
||||
[Tooltip("水平分量明显大于垂直分量时,优先躺漂")] public float planarDominanceMultiplier = 1.20f;
|
||||
|
||||
[Tooltip("姿态切换滞回")]
|
||||
public float postureHysteresis = 0.04f;
|
||||
[Tooltip("姿态切换滞回")] public float postureHysteresis = 0.04f;
|
||||
|
||||
[Header("Posture Rotation")]
|
||||
[Tooltip("倾斜状态角度")]
|
||||
[Header("Posture Rotation")] [Tooltip("倾斜状态角度")]
|
||||
public float tiltedAngle = 38f;
|
||||
|
||||
[Tooltip("躺漂角度")]
|
||||
public float lyingAngle = 88f;
|
||||
[Tooltip("躺漂角度")] public float lyingAngle = 88f;
|
||||
|
||||
[Tooltip("立漂时允许的最大附加倾角")]
|
||||
public float uprightMaxTiltAngle = 8f;
|
||||
[Tooltip("立漂时允许的最大附加倾角")] public float uprightMaxTiltAngle = 8f;
|
||||
|
||||
[Tooltip("平面方向对立漂/斜漂附加倾角的影响强度")]
|
||||
public float planarTiltFactor = 120f;
|
||||
[Tooltip("平面方向对立漂/斜漂附加倾角的影响强度")] public float planarTiltFactor = 120f;
|
||||
|
||||
[Tooltip("姿态平滑速度")]
|
||||
public float rotationLerpSpeed = 8f;
|
||||
[Tooltip("姿态平滑速度")] public float rotationLerpSpeed = 8f;
|
||||
|
||||
[Header("Debug Input")]
|
||||
[Tooltip("调试:按 R 恢复默认")]
|
||||
[Header("Debug Input")] [Tooltip("调试:按 R 恢复默认")]
|
||||
public bool debugResetKey = true;
|
||||
|
||||
[Tooltip("调试:按 T 触发轻点")]
|
||||
public bool debugTapKey = true;
|
||||
[Tooltip("调试:按 T 触发轻点")] public bool debugTapKey = true;
|
||||
|
||||
[Tooltip("调试:按 G 触发缓沉")]
|
||||
public bool debugSlowSinkKey = true;
|
||||
[Tooltip("调试:按 G 触发缓沉")] public bool debugSlowSinkKey = true;
|
||||
|
||||
[Tooltip("调试:按 H 触发送漂")]
|
||||
public bool debugLiftKey = true;
|
||||
[Tooltip("调试:按 H 触发送漂")] public bool debugLiftKey = true;
|
||||
|
||||
[Tooltip("调试:按 B 触发黑漂")]
|
||||
public bool debugBlackDriftKey = true;
|
||||
[Tooltip("调试:按 B 触发黑漂")] public bool debugBlackDriftKey = true;
|
||||
|
||||
[Header("Debug")]
|
||||
public bool drawDebug = false;
|
||||
[Header("Debug")] public bool drawDebug = false;
|
||||
|
||||
public BobberControlMode CurrentMode => _mode;
|
||||
public BobberPosture CurrentPosture => _posture;
|
||||
@@ -218,6 +191,12 @@ public class BobberPresentationController : MonoBehaviour
|
||||
private float _verticalDistance;
|
||||
private float _planarDistance;
|
||||
|
||||
private bool _hasCrestSampleThisFrame;
|
||||
private readonly Vector3[] _waterQueryPoints = new Vector3[1];
|
||||
private readonly Vector3[] _waterQueryResultDisplacements = new Vector3[1];
|
||||
private readonly Vector3[] _waterQueryResultVelocities = new Vector3[1];
|
||||
private readonly Vector3[] _waterQueryResultNormal = new Vector3[1];
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_rb = GetComponent<Rigidbody>();
|
||||
@@ -229,6 +208,9 @@ public class BobberPresentationController : MonoBehaviour
|
||||
if (waterProviderBehaviour != null)
|
||||
_waterProvider = waterProviderBehaviour as IWaterSurfaceProvider;
|
||||
|
||||
if (waterRenderer == null && SceneSettings.Instance != null)
|
||||
waterRenderer = SceneSettings.Instance.Water;
|
||||
|
||||
_targetRotation = transform.rotation;
|
||||
}
|
||||
|
||||
@@ -404,7 +386,7 @@ public class BobberPresentationController : MonoBehaviour
|
||||
}
|
||||
|
||||
float surfaceBob = 0f;
|
||||
if (enableSurfaceBobbing)
|
||||
if (enableSurfaceBobbing && !_hasCrestSampleThisFrame)
|
||||
{
|
||||
surfaceBob = Mathf.Sin(Time.time * surfaceBobFrequency * Mathf.PI * 2f) * surfaceBobAmplitude;
|
||||
}
|
||||
@@ -701,6 +683,7 @@ public class BobberPresentationController : MonoBehaviour
|
||||
float k = (t - 0.35f) / 0.65f;
|
||||
targetOffset = -Mathf.Lerp(_biteAmplitude, 0f, k);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case BobberBiteType.SlowSink:
|
||||
@@ -742,7 +725,35 @@ public class BobberPresentationController : MonoBehaviour
|
||||
|
||||
private float GetWaterHeight(Vector3 worldPos)
|
||||
{
|
||||
return _waterProvider != null ? _waterProvider.GetWaterHeight(worldPos) : fallbackWaterLevel;
|
||||
if (_waterProvider != null)
|
||||
{
|
||||
_hasCrestSampleThisFrame = false;
|
||||
return _waterProvider.GetWaterHeight(worldPos);
|
||||
}
|
||||
|
||||
if (
|
||||
waterRenderer != null
|
||||
&& waterRenderer.AnimatedWavesLod != null
|
||||
&& waterRenderer.AnimatedWavesLod.Provider != null
|
||||
)
|
||||
{
|
||||
_waterQueryPoints[0] = worldPos;
|
||||
waterRenderer.AnimatedWavesLod.Provider.Query(
|
||||
GetHashCode(),
|
||||
Mathf.Max(0.001f, waterQueryObjectWidth),
|
||||
_waterQueryPoints,
|
||||
_waterQueryResultDisplacements,
|
||||
_waterQueryResultNormal,
|
||||
_waterQueryResultVelocities,
|
||||
waterCollisionLayer
|
||||
);
|
||||
|
||||
_hasCrestSampleThisFrame = true;
|
||||
return _waterQueryResultDisplacements[0].y + waterRenderer.SeaLevel;
|
||||
}
|
||||
|
||||
_hasCrestSampleThisFrame = false;
|
||||
return fallbackWaterLevel;
|
||||
}
|
||||
|
||||
private Vector3 GetBottomWorldPosition()
|
||||
@@ -821,6 +832,7 @@ public class BobberPresentationController : MonoBehaviour
|
||||
maxExtraSink = Mathf.Max(0f, maxExtraSink);
|
||||
surfaceBobAmplitude = Mathf.Max(0f, surfaceBobAmplitude);
|
||||
surfaceBobFrequency = Mathf.Max(0f, surfaceBobFrequency);
|
||||
waterQueryObjectWidth = Mathf.Max(0.001f, waterQueryObjectWidth);
|
||||
yDeadZone = Mathf.Max(0f, yDeadZone);
|
||||
|
||||
referenceLength = Mathf.Max(0.0001f, referenceLength);
|
||||
@@ -839,4 +851,4 @@ public class BobberPresentationController : MonoBehaviour
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
256
Assets/Water2.mat
Normal file
256
Assets/Water2.mat
Normal file
@@ -0,0 +1,256 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-8686106315147607512
|
||||
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: da692e001514ec24dbc4cca1949ff7e8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.HighDefinition.Editor::UnityEditor.Rendering.HighDefinition.AssetVersion
|
||||
version: 13
|
||||
hdPluginSubTargetMaterialVersions:
|
||||
m_Keys: []
|
||||
m_Values:
|
||||
--- !u!114 &-8485023484760234584
|
||||
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: Water2
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 00ffe7d0b7161420897069dc6e12822c, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHATEST_ON
|
||||
- _BUILTIN_ALPHATEST_ON
|
||||
- _BUILTIN_AlphaClip
|
||||
- _BUILTIN_SURFACE_TYPE_TRANSPARENT
|
||||
- _DOUBLESIDED_ON
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _REFRACTION_PLANE
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
- _TRANSPARENT_WRITES_MOTION_VEC
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 2
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 1
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
MotionVector: User
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- SHADOWCASTER
|
||||
- MOTIONVECTORS
|
||||
- TransparentDepthPostpass
|
||||
- TransparentBackface
|
||||
- RayTracingPrepass
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _Crest_CausticsDistortionTexture:
|
||||
m_Texture: {fileID: 2800000, guid: 7aa3f69cfb40b429a865c45a7271c5f5, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Crest_CausticsTexture:
|
||||
m_Texture: {fileID: 2800000, guid: 1407209016967410da2ae6fdd4d97fc6, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Crest_FoamTexture:
|
||||
m_Texture: {fileID: 2800000, guid: 959dd0505e2c54585865f51257daa0e3, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Crest_NormalMapTexture:
|
||||
m_Texture: {fileID: 2800000, guid: 7aa3f69cfb40b429a865c45a7271c5f5, type: 3}
|
||||
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:
|
||||
- CREST_FLOW: 0
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 1
|
||||
- _AlphaCutoffEnable: 1
|
||||
- _AlphaDstBlend: 10
|
||||
- _AlphaSrcBlend: 1
|
||||
- _AlphaToMask: 0
|
||||
- _BUILTIN_AlphaClip: 1
|
||||
- _BUILTIN_Blend: 0
|
||||
- _BUILTIN_CullMode: 0
|
||||
- _BUILTIN_DstBlend: 10
|
||||
- _BUILTIN_QueueControl: 0
|
||||
- _BUILTIN_QueueOffset: 0
|
||||
- _BUILTIN_SrcBlend: 5
|
||||
- _BUILTIN_Surface: 1
|
||||
- _BUILTIN_TransparentReceiveShadows: 1
|
||||
- _BUILTIN_WorkflowMode: 1
|
||||
- _BUILTIN_ZTest: 4
|
||||
- _BUILTIN_ZWrite: 1
|
||||
- _BUILTIN_ZWriteControl: 1
|
||||
- _Blend: 0
|
||||
- _BlendMode: 0
|
||||
- _BlendModePreserveSpecular: 0
|
||||
- _CastShadows: 0
|
||||
- _ConservativeDepthOffsetEnable: 0
|
||||
- _Crest_AlbedoEnabled: 0
|
||||
- _Crest_AlbedoIgnoreFoam: 1
|
||||
- _Crest_AmbientTerm: 1
|
||||
- _Crest_Anisotropy: 0.5
|
||||
- _Crest_BUILTIN_ShadowCasterZTest: 4
|
||||
- _Crest_CausticsDepthOfField: 6
|
||||
- _Crest_CausticsDistortionScale: 250
|
||||
- _Crest_CausticsDistortionStrength: 0.16
|
||||
- _Crest_CausticsEnabled: 1
|
||||
- _Crest_CausticsFocalDepth: 2
|
||||
- _Crest_CausticsMotionBlur: 1
|
||||
- _Crest_CausticsScrollSpeed: 1
|
||||
- _Crest_CausticsStrength: 3.2
|
||||
- _Crest_CausticsTextureAverage: 0.07
|
||||
- _Crest_CausticsTextureScale: 50
|
||||
- _Crest_DirectTerm: 1
|
||||
- _Crest_FoamEnabled: 1
|
||||
- _Crest_FoamFeather: 0.75
|
||||
- _Crest_FoamIntensityAlbedo: 1
|
||||
- _Crest_FoamNormalStrength: 1
|
||||
- _Crest_FoamScale: 5
|
||||
- _Crest_FoamScrollSpeed: 1
|
||||
- _Crest_FoamSmoothness: 0.7
|
||||
- _Crest_MinimumReflectionDirectionY: 0.03
|
||||
- _Crest_NormalMapEnabled: 1
|
||||
- _Crest_NormalMapScale: 3
|
||||
- _Crest_NormalMapScrollSpeed: 1
|
||||
- _Crest_NormalMapStrength: 0.15
|
||||
- _Crest_NormalsStrengthOverall: 1
|
||||
- _Crest_Occlusion: 1
|
||||
- _Crest_OcclusionUnderwater: 0
|
||||
- _Crest_PlanarReflectionsDistortion: 1
|
||||
- _Crest_PlanarReflectionsEnabled: 0
|
||||
- _Crest_PlanarReflectionsIntensity: 1
|
||||
- _Crest_PlanarReflectionsRoughness: 1
|
||||
- _Crest_RefractionStrength: 1
|
||||
- _Crest_RefractiveIndexOfWater: 1.33
|
||||
- _Crest_SSSDirectionalFalloff: 2
|
||||
- _Crest_SSSEnabled: 0
|
||||
- _Crest_SSSIntensity: 3
|
||||
- _Crest_SSSPinchFalloff: 1.5
|
||||
- _Crest_SSSPinchMaximum: 1.67
|
||||
- _Crest_SSSPinchMinimum: 0.57
|
||||
- _Crest_ShadowCasterThreshold: 0.5
|
||||
- _Crest_ShadowsAffectsAmbientFactor: 0.5
|
||||
- _Crest_ShadowsEnabled: 1
|
||||
- _Crest_Smoothness: 0.9
|
||||
- _Crest_SmoothnessFalloff: 0.5
|
||||
- _Crest_SmoothnessFar: 0.8
|
||||
- _Crest_SmoothnessFarDistance: 4000
|
||||
- _Crest_Specular: 0.25
|
||||
- _Crest_TotalInternalReflectionIntensity: 0.8
|
||||
- _Crest_Version: 0
|
||||
- _Cull: 0
|
||||
- _CullMode: 0
|
||||
- _CullModeForward: 0
|
||||
- _DepthOffsetEnable: 0
|
||||
- _DoubleSidedEnable: 1
|
||||
- _DoubleSidedGIMode: 0
|
||||
- _DoubleSidedNormalMode: 2
|
||||
- _DstBlend: 10
|
||||
- _DstBlend2: 10
|
||||
- _DstBlendAlpha: 10
|
||||
- _EnableBlendModePreserveSpecularLighting: 0
|
||||
- _EnableFogOnTransparent: 1
|
||||
- _ExcludeFromTUAndAA: 0
|
||||
- _MaterialID: 1
|
||||
- _MaterialTypeMask: 18
|
||||
- _OpaqueCullMode: 2
|
||||
- _PerPixelSorting: 0
|
||||
- _QueueControl: 0
|
||||
- _QueueOffset: 0
|
||||
- _RayTracing: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _ReceivesSSR: 1
|
||||
- _ReceivesSSRTransparent: 1
|
||||
- _RefractionModel: 1
|
||||
- _RenderQueueType: 4
|
||||
- _RequireSplitLighting: 0
|
||||
- _SrcBlend: 5
|
||||
- _SrcBlendAlpha: 1
|
||||
- _StencilRef: 0
|
||||
- _StencilRefDepth: 24
|
||||
- _StencilRefDistortionVec: 4
|
||||
- _StencilRefGBuffer: 10
|
||||
- _StencilRefMV: 40
|
||||
- _StencilWriteMask: 6
|
||||
- _StencilWriteMaskDepth: 25
|
||||
- _StencilWriteMaskDistortionVec: 4
|
||||
- _StencilWriteMaskGBuffer: 15
|
||||
- _StencilWriteMaskMV: 41
|
||||
- _SupportDecals: 1
|
||||
- _Surface: 1
|
||||
- _SurfaceType: 1
|
||||
- _TransmissionEnable: 1
|
||||
- _TransparentBackfaceEnable: 0
|
||||
- _TransparentCullMode: 2
|
||||
- _TransparentDepthPostpassEnable: 0
|
||||
- _TransparentDepthPrepassEnable: 0
|
||||
- _TransparentSortPriority: 0
|
||||
- _TransparentWritingMotionVec: 1
|
||||
- _TransparentZWrite: 1
|
||||
- _UseShadowThreshold: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZTest: 4
|
||||
- _ZTestDepthEqualForOpaque: 4
|
||||
- _ZTestGBuffer: 3
|
||||
- _ZTestTransparent: 4
|
||||
- _ZWrite: 1
|
||||
- _ZWriteControl: 1
|
||||
m_Colors:
|
||||
- _Crest_Absorption: {r: 0.70086163, g: 0.236999, b: 0.106051564, a: 1}
|
||||
- _Crest_AbsorptionColor: {r: 0.34162676, g: 0.6954546, b: 0.85, a: 0.1019608}
|
||||
- _Crest_Scattering: {r: 0, g: 0.09803919, b: 0.19999996, a: 1}
|
||||
- _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0}
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &5462340382208678671
|
||||
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: 639247ca83abc874e893eb93af2b5e44, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.ShaderGraph.Editor::UnityEditor.Rendering.BuiltIn.AssetVersion
|
||||
version: 0
|
||||
8
Assets/Water2.mat.meta
Normal file
8
Assets/Water2.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c45c61012a9f980468bfce0c6f6f5f54
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -15,11 +15,14 @@ Material:
|
||||
- d_Crest_NoMaskDepth
|
||||
- d_Dithering
|
||||
m_InvalidKeywords:
|
||||
- CREST_CAUSTICS_ON
|
||||
- CREST_FOAM_ON
|
||||
- _ALPHATEST_ON
|
||||
- _BUILTIN_ALPHATEST_ON
|
||||
- _BUILTIN_AlphaClip
|
||||
- _BUILTIN_SURFACE_TYPE_TRANSPARENT
|
||||
- _DOUBLESIDED_ON
|
||||
- _EMISSION
|
||||
- _ENABLE_FOG_ON_TRANSPARENT
|
||||
- _REFRACTION_PLANE
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
|
||||
@@ -843,7 +843,7 @@ PlayerSettings:
|
||||
QNX: TextMeshPro;UNITY_VISUAL_SCRIPTING;ES3_TMPRO;ES3_UGUI;ENVIRO_3;ENVIRO_URP;UNITY_POST_PROCESSING_STACK_V2;DotSpatial
|
||||
ReservedCFE: TextMeshPro;ENVIRO_3;ENVIRO_URP;UNITY_POST_PROCESSING_STACK_V2;DotSpatial
|
||||
Server: UNITY_VISUAL_SCRIPTING;ES3_TMPRO;ES3_UGUI
|
||||
Standalone: CINEMACHINE_URP;FAIRYGUI_TMPRO;OBI_ONI_SUPPORTED;TextMeshPro;UNITY_VISUAL_SCRIPTING;ES3_TMPRO;ES3_UGUI;STEAMWORKS_NET;ENVIRO_3;ENVIRO_URP;VLB_URP;UPPipeline;__MICROSPLAT__;__MICROSPLAT_SNOW__;__MICROSPLAT_ALPHAHOLE__;__MICROSPLAT_MESH__;__MICROSPLAT_STREAMS__;__MICROSPLAT_GLOBALTEXTURE__;__MICROSPLAT_TRAX__;__MICROSPLAT_DECAL__;__MICROSPLAT_SCATTER__;__MICROSPLAT_TEXTURECLUSTERS__;__MICROSPLAT_MESHTERRAIN__;__MICROSPLAT_DETAILRESAMPLE__;__MICROSPLAT_TERRAINBLEND__;__MICROSPLAT_TESSELLATION__;__MICROSPLAT_WINDGLITTER__;__MICROSPLAT_LOWPOLY__;__MICROSPLAT_OBJECTSHADER__;__MICROSPLAT_PROCTEX__;__MICROSPLAT_TRIPLANAR__;__MICROSPLAT_MICROVERSEPREVIEW__;UNITY_POST_PROCESSING_STACK_V2;DotSpatial;FANTASY_UNITY;KWS_HD_MODULE_INSTALLED;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_3_2;ODIN_INSPECTOR_3_3;KWS_URP;NWH_DWP2;GAIA_CINEMACHINE;GAIA_INPUT_SYSTEM;GAIA_2023;GAIA_2023_PRO;GAIA_MESH_PRESENT;GTS_PRESENT;GeNa_URP;GENA_PRO
|
||||
Standalone: CINEMACHINE_URP;FAIRYGUI_TMPRO;OBI_ONI_SUPPORTED;TextMeshPro;UNITY_VISUAL_SCRIPTING;ES3_TMPRO;ES3_UGUI;STEAMWORKS_NET;ENVIRO_3;ENVIRO_URP;VLB_URP;UPPipeline;__MICROSPLAT__;__MICROSPLAT_SNOW__;__MICROSPLAT_ALPHAHOLE__;__MICROSPLAT_MESH__;__MICROSPLAT_STREAMS__;__MICROSPLAT_GLOBALTEXTURE__;__MICROSPLAT_TRAX__;__MICROSPLAT_DECAL__;__MICROSPLAT_SCATTER__;__MICROSPLAT_TEXTURECLUSTERS__;__MICROSPLAT_MESHTERRAIN__;__MICROSPLAT_DETAILRESAMPLE__;__MICROSPLAT_TERRAINBLEND__;__MICROSPLAT_TESSELLATION__;__MICROSPLAT_WINDGLITTER__;__MICROSPLAT_LOWPOLY__;__MICROSPLAT_OBJECTSHADER__;__MICROSPLAT_PROCTEX__;__MICROSPLAT_TRIPLANAR__;__MICROSPLAT_MICROVERSEPREVIEW__;UNITY_POST_PROCESSING_STACK_V2;DotSpatial;FANTASY_UNITY;KWS_HD_MODULE_INSTALLED;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_3_2;ODIN_INSPECTOR_3_3;KWS_URP;GAIA_INPUT_SYSTEM
|
||||
VisionOS: TextMeshPro;UNITY_VISUAL_SCRIPTING;ES3_TMPRO;ES3_UGUI;ENVIRO_3;ENVIRO_URP;UNITY_POST_PROCESSING_STACK_V2;DotSpatial
|
||||
WebGL: TextMeshPro;UNITY_VISUAL_SCRIPTING;ES3_TMPRO;ES3_UGUI;ENVIRO_3;ENVIRO_URP;UNITY_POST_PROCESSING_STACK_V2;DotSpatial
|
||||
Windows Store Apps: UNITY_VISUAL_SCRIPTING;ES3_TMPRO;ES3_UGUI;DotSpatial
|
||||
|
||||
@@ -18,26 +18,26 @@ EditorUserSettings:
|
||||
value: 5606515f5605500b0e5c5c2615760a444615487c2a2a2467297d1932b7e4673a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-3:
|
||||
value: 0054045155060d5a5c575f7045270d44474f4e7c7f7924637e2a1832b1b5636d
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-4:
|
||||
value: 0608045752515c5d54580e7b167306444e4e1a7e2e7b71357c2d4b36e0b9656c
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-5:
|
||||
RecentlyUsedSceneGuid-4:
|
||||
value: 00050c5150005f5f54560f2640270d4410161c28282b72357e7c4835e4b63760
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-6:
|
||||
RecentlyUsedSceneGuid-5:
|
||||
value: 5302035e5c530f0b5c0c557416270d44134e4d28787c76332f7e1f6bb1b76169
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-7:
|
||||
RecentlyUsedSceneGuid-6:
|
||||
value: 0508070250545c58585e0924437b5d444f4e4b7f7d7a71627f794c64b2e5633a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-8:
|
||||
RecentlyUsedSceneGuid-7:
|
||||
value: 5309035757065a0a54575f7216265c4444151d28792e72627d2f1935bbb8673a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-9:
|
||||
RecentlyUsedSceneGuid-8:
|
||||
value: 5505015f5c515a085f5b092149760f441716407a787d7564287b1b36e7e1366e
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-9:
|
||||
value: 0054045155060d5a5c575f7045270d44474f4e7c7f7924637e2a1832b1b5636d
|
||||
flags: 0
|
||||
UnityEditor.ShaderGraph.Blackboard:
|
||||
value: 18135939215a0a5004000b0e15254b524c030a3f2964643d120d1230e9e93a3fd6e826abbd2e2d293c4ead313b08042de6030a0afa240c0d020be94c4ba75e435d8715fa32c70d15d11612dacc11fee5d3c5d1fe9ab1bf968e93e2ffcbc3e7e2f0b3ffe0e8b0be9afeffa9ffff8e85dd8390e2969e8899daa7
|
||||
flags: 0
|
||||
|
||||
Reference in New Issue
Block a user