浏览代码

Initial update for 19.1

-there is a bug with the depth not rendering will update with new package when available.
/2019.3-marc
André McGrail 5 年前
当前提交
5b399baf
共有 5 个文件被更改,包括 16 次插入18 次删除
  1. 16
      Assets/scenes/Island.unity
  2. 5
      Packages/com.verasl.water-system/Scripts/Water.cs
  3. 4
      Packages/com.verasl.water-system/Shaders/WaterCommon.hlsl
  4. 7
      Packages/manifest.json
  5. 2
      ProjectSettings/QualitySettings.asset

16
Assets/scenes/Island.unity


- m_Script
m_LockStageInInspector:
m_StreamingVersion: 20170927
m_Priority: 5
m_Priority: 10
m_StandbyUpdate: 2
m_LookAt: {fileID: 1940308779}
m_Follow: {fileID: 1940308779}

objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 074aa8ca109924e18baf19f3e26665b6, type: 3}
propertyPath: m_LocalPosition.x
value: 75
value: -31.25
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 074aa8ca109924e18baf19f3e26665b6, type: 3}
propertyPath: m_LocalPosition.y

propertyPath: m_LocalPosition.z
value: -68.75
value: -62.5
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 074aa8ca109924e18baf19f3e26665b6, type: 3}
propertyPath: m_LocalRotation.x

width: 1
height: 1
near clip plane: 0.1
far clip plane: 5000
field of view: 60
far clip plane: 500
field of view: 70
orthographic: 0
orthographic size: 10
m_Depth: -5

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1017609894}
m_LocalRotation: {x: 0.06724601, y: 0.43141484, z: 0.032352548, w: -0.8990621}
m_LocalPosition: {x: 118.93, y: 5.9, z: -95.16066}
m_LocalRotation: {x: 0.045673043, y: -0.87389, z: 0.14429906, w: 0.46196115}
m_LocalPosition: {x: -27.64817, y: 3.388555, z: -58.78851}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 208737146}

- m_Script
m_LockStageInInspector:
m_StreamingVersion: 20170927
m_Priority: 10
m_Priority: 5
m_StandbyUpdate: 2
m_LookAt: {fileID: 0}
m_Follow: {fileID: 0}

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


{
SetWaves();
GenerateColorRamp();
if (_bakedDepthTex)
/*if (_bakedDepthTex)
}
}*/
CaptureDepthMap();
}
void Update()

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


screenUV.xyz /= screenUV.w;
// shallows mask
half waterDepth = UNITY_REVERSED_Z + SAMPLE_DEPTH_TEXTURE_LOD(_WaterDepthMap, sampler_WaterDepthMap_linear_clamp, (input.posWS.xz * half2(0.002, -0.002)) + 0.5, 1).r * _ProjectionParams.x;
half waterDepth = UNITY_REVERSED_Z + SAMPLE_DEPTH_TEXTURE_LOD(_WaterDepthMap, sampler_WaterDepthMap_linear_clamp, (input.posWS.xz * 0.002) + 0.5, 1).r * _ProjectionParams.x;
waterDepth = ((waterDepth * _depthCamZParams.y) - 4 - _depthCamZParams.x);
input.posWS.y += saturate((1 - waterDepth) * 0.6 - 0.5);

IN.normal += half3(1-waterFX.y, 0.5h, 1-waterFX.z) - 0.5;
// Depth
float3 depth = WaterDepth(IN.posWS, (IN.posWS.xz * half2(0.002, -0.002)) + 0.5, IN.additionalData, screenUV.xy);// TODO - hardcoded shore depth UVs
float3 depth = WaterDepth(IN.posWS, (IN.posWS.xz * 0.002) + 0.5, IN.additionalData, screenUV.xy);// TODO - hardcoded shore depth UVs
// Distortion
half2 distortion = DistortionUVs(depth.x, IN.normal);

7
Packages/manifest.json


"com.unity.analytics": "3.3.2",
"com.unity.burst": "0.2.4-preview.45",
"com.unity.cinemachine": "2.3.3",
"com.unity.mathematics": "0.0.12-preview.21",
"com.unity.mathematics": "1.0.0-preview.1",
"com.unity.postprocessing": "2.1.3",
"com.unity.render-pipelines.core": "file:../../SRP/com.unity.render-pipelines.core",
"com.unity.render-pipelines.lightweight": "file:../../SRP/com.unity.render-pipelines.lightweight",
"com.unity.shadergraph": "file:../../SRP/com.unity.shadergraph",
"com.unity.render-pipelines.lightweight": "5.8.1",
"com.unity.textmeshpro": "1.3.0",
"com.unity.timeline": "1.0.0",
"com.unity.modules.ai": "1.0.0",

2
ProjectSettings/QualitySettings.asset


skinWeights: 2
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 2
antiAliasing: 0
softParticles: 1
softVegetation: 1
realtimeReflectionProbes: 1

正在加载...
取消
保存