浏览代码

Assorted Changes

- Enabled soft shadows on low asset
- Embedded and upgraded builtin proc sky shader
- Added Dithered Crossfade to the Vegetation shadergraph
- Lowered LOD bias for planar reflections
- Hardcoded water ramp texture format
/demo-work
André McGrail 5 年前
当前提交
49320f4a
共有 41 个文件被更改,包括 964 次插入298 次删除
  1. 2
      Assets/Data/UniversalRP/PipelineAsset_Low.asset
  2. 2
      Assets/Objects/Levels/Island/ClearSky/ClearSky.mat
  3. 1
      Assets/Objects/environment/Trees/Materials/Trees.mat
  4. 85
      Assets/Objects/environment/Trees/Materials/Trees_billboards.mat
  5. 2
      Assets/Objects/environment/Trees/Prefabs/PalmB_01.prefab
  6. 2
      Assets/Objects/environment/Trees/Prefabs/PalmB_02.prefab
  7. 215
      Assets/Objects/environment/Trees/Prefabs/Palm_01.prefab
  8. 2
      Assets/Objects/environment/Trees/Prefabs/Palm_02.prefab
  9. 2
      Assets/Objects/environment/Trees/Prefabs/Palm_03.prefab
  10. 2
      Assets/Shaders/Vegetation/LODCrossfade.hlsl
  11. 124
      Assets/Shaders/Vegetation/Vegetation.shadergraph
  12. 16
      Assets/Textures/normalNoise.png.meta
  13. 73
      Assets/scenes/Island.unity
  14. 2
      Packages/com.verasl.water-system/Scripts/Rendering/PlanarReflections.cs
  15. 2
      Packages/com.verasl.water-system/Scripts/Water.cs
  16. 8
      Assets/Objects/environment/Trees/Meshes.meta
  17. 406
      Assets/Shaders/Skybox-Procedural-Universal.shader
  18. 9
      Assets/Shaders/Skybox-Procedural-Universal.shader.meta
  19. 297
      Assets/Shaders/UtilityGraphs/DitherCrossfade.shadersubgraph
  20. 10
      Assets/Shaders/UtilityGraphs/DitherCrossfade.shadersubgraph.meta
  21. 0
      /Assets/Objects/environment/Trees/Meshes/Palm_01.fbx
  22. 0
      /Assets/Objects/environment/Trees/Meshes/Palm_01.fbx.meta
  23. 0
      /Assets/Objects/environment/Trees/Meshes/Palm_02.fbx
  24. 0
      /Assets/Objects/environment/Trees/Meshes/Palm_02.fbx.meta
  25. 0
      /Assets/Objects/environment/Trees/Meshes/Palm_03.fbx
  26. 0
      /Assets/Objects/environment/Trees/Meshes/Palm_03.fbx.meta
  27. 0
      /Assets/Objects/environment/Trees/Meshes/Bush_Large_01.fbx
  28. 0
      /Assets/Objects/environment/Trees/Meshes/Bush_Large_01.fbx.meta
  29. 0
      /Assets/Objects/environment/Trees/Meshes/PalmB_01.fbx
  30. 0
      /Assets/Objects/environment/Trees/Meshes/PalmB_01.fbx.meta
  31. 0
      /Assets/Objects/environment/Trees/Meshes/PalmB_02.fbx
  32. 0
      /Assets/Objects/environment/Trees/Meshes/PalmB_02.fbx.meta
  33. 0
      /Assets/Objects/environment/Trees/Meshes/bush_A.fbx
  34. 0
      /Assets/Objects/environment/Trees/Meshes/bush_A.fbx.meta
  35. 0
      /Assets/Objects/environment/Trees/Meshes/grass_clump.fbx
  36. 0
      /Assets/Objects/environment/Trees/Meshes/grass_clump.fbx.meta
  37. 0
      /Assets/Objects/environment/Trees/Meshes/small_tree_B.fbx
  38. 0
      /Assets/Objects/environment/Trees/Meshes/small_tree_B.fbx.meta
  39. 0
      /Assets/Objects/environment/Trees/Meshes/small_tree_A.fbx
  40. 0
      /Assets/Objects/environment/Trees/Meshes/small_tree_A.fbx.meta

2
Assets/Data/UniversalRP/PipelineAsset_Low.asset


m_Cascade4Split: {x: 0.053413056, y: 0.13206536, z: 0.42623913}
m_ShadowDepthBias: 0.75
m_ShadowNormalBias: 0.75
m_SoftShadowsSupported: 0
m_SoftShadowsSupported: 1
m_UseSRPBatcher: 1
m_SupportsDynamicBatching: 0
m_MixedLightingSupported: 1

2
Assets/Objects/Levels/Island/ClearSky/ClearSky.mat


m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ClearSky
m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 4800000, guid: 375dd840ed8484cb68923f5aebe560fe, type: 3}
m_ShaderKeywords: _ENVIRONMENTREFLECTIONS_OFF _SUNDISK_HIGH_QUALITY
m_LightmapFlags: 4
m_EnableInstancingVariants: 0

1
Assets/Objects/environment/Trees/Materials/Trees.mat


m_Offset: {x: 0, y: 0}
m_Floats:
- BOOLEAN_5C6B42CA: 1
- BOOLEAN_7021FEFA: 0
- BOOLEAN_D0D03BFD: 1
- Boolean_F799EE7C: 1
- VERTEX_ANIMATION: 1

85
Assets/Objects/environment/Trees/Materials/Trees_billboards.mat


m_Name: Trees_billboards
m_Shader: {fileID: -6465566751694194690, guid: 4003ffa965d444d209561b52e55c61fc,
type: 3}
m_ShaderKeywords: BOOLEAN_D0D03BFD_ON _ALPHATEST_ON _CORRECTNORMALS _NORMALMAP
_OCCLUSIONMAP
m_ShaderKeywords: BOOLEAN_7021FEFA_ON BOOLEAN_D0D03BFD_ON _ALPHATEST_ON _CORRECTNORMALS
_NORMALMAP _OCCLUSIONMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0

m_Texture: {fileID: 2800000, guid: cb4e6d4d6255441508cbdd9c3d4f70b9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 2800000, guid: d3c6ee8c356284d78820381414c52d11, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 2800000, guid: edc1c79cd34b14a6baca71b234a68a62, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: d3c6ee8c356284d78820381414c52d11, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 2800000, guid: f0d39154449074e4a9d7944450523661, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- BOOLEAN_D0D03BFD: 1
- Boolean_F799EE7C: 1
- VERTEX_ANIMATION: 0
- Vector1_19FBDA45: 0.3
- Vector1_4F6BB00E: 0.5
- _AlphaClip: 1
- _BendStrength: 0.05
- _Blend: 0
- _BumpScale: 1
- _CorrectNormals: 1
- _Cull: 0
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _Gloss: 0.3
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _UVSec: 0
- _VertexAnimation: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- BOOLEAN_5C6B42CA: 0
- BOOLEAN_7021FEFA: 1
- Vector1_19FBDA45: 0.5
m_Colors: []

2
Assets/Objects/environment/Trees/Prefabs/PalmB_01.prefab


m_LocalReferencePoint: {x: 0.2263856, y: 3.9349666, z: 1.2567744}
m_Size: 7.9751406
m_FadeMode: 1
m_AnimateCrossFading: 1
m_AnimateCrossFading: 0
m_LastLODIsBillboard: 0
m_LODs:
- screenRelativeHeight: 0.3461439

2
Assets/Objects/environment/Trees/Prefabs/PalmB_02.prefab


m_LocalReferencePoint: {x: 0.31078982, y: 5.0169616, z: 1.1899998}
m_Size: 10.251151
m_FadeMode: 1
m_AnimateCrossFading: 1
m_AnimateCrossFading: 0
m_LastLODIsBillboard: 0
m_LODs:
- screenRelativeHeight: 0.3461439

215
Assets/Objects/environment/Trees/Prefabs/Palm_01.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1402090239586902}
m_IsPrefabAsset: 1
m_PrefabInternal: {fileID: 100100000}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4590211134741006}

m_NavMeshLayer: 0
m_StaticEditorFlags: 121
m_IsActive: 1
--- !u!4 &4590211134741006
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1402090239586902}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 9.95, y: 0, z: -9.68}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4351842160817564}
- {fileID: 4556663440861136}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!205 &205557823479122812
LODGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1402090239586902}
serializedVersion: 2
m_LocalReferencePoint: {x: 0.6400001, y: 3.24, z: 1.0499997}
m_Size: 7.9199996
m_FadeMode: 1
m_AnimateCrossFading: 0
m_LastLODIsBillboard: 0
m_LODs:
- screenRelativeHeight: 0.3461439
fadeTransitionWidth: 0.25
renderers:
- renderer: {fileID: 23843777350365382}
- screenRelativeHeight: 0.048097678
fadeTransitionWidth: 0.25
renderers:
- renderer: {fileID: 23338955538967662}
m_Enabled: 1
m_PrefabInternal: {fileID: 100100000}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4351842160817564}

m_NavMeshLayer: 0
m_StaticEditorFlags: 121
m_IsActive: 1
--- !u!1 &1878461291207564
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4556663440861136}
- component: {fileID: 33890458534892234}
- component: {fileID: 23338955538967662}
m_Layer: 0
m_Name: Palm_LOD1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_ObjectHideFlags: 1
m_ObjectHideFlags: 0
m_PrefabInternal: {fileID: 100100000}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647010619881864}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}

m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4556663440861136
Transform:
m_ObjectHideFlags: 1
--- !u!33 &33200168467422702
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1878461291207564}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4590211134741006}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4590211134741006
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1402090239586902}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 9.95, y: 0, z: -9.68}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4351842160817564}
- {fileID: 4556663440861136}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &23338955538967662
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647010619881864}
m_Mesh: {fileID: 4300000, guid: 9dc2c8e7b43dea544b62b08ed3253a04, type: 3}
--- !u!23 &23843777350365382
m_ObjectHideFlags: 1
m_ObjectHideFlags: 0
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1878461291207564}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1647010619881864}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1

m_ReflectionProbeUsage: 3
m_RayTracingMode: 2
m_RendererPriority: 0
- {fileID: 2100000, guid: 7e3016a4668af4ed0879281ab8cfda9b, type: 2}
- {fileID: 2100000, guid: 65362f8b29e996742896ce4dd8a6d723, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0

m_ScaleInLightmap: 0
m_ReceiveGI: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!23 &23843777350365382
--- !u!1 &1878461291207564
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4556663440861136}
- component: {fileID: 33890458534892234}
- component: {fileID: 23338955538967662}
m_Layer: 0
m_Name: Palm_LOD1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 1
m_IsActive: 1
--- !u!4 &4556663440861136
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1878461291207564}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4590211134741006}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &33890458534892234
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1878461291207564}
m_Mesh: {fileID: 4300002, guid: 9dc2c8e7b43dea544b62b08ed3253a04, type: 3}
--- !u!23 &23338955538967662
m_ObjectHideFlags: 1
m_ObjectHideFlags: 0
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1647010619881864}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1878461291207564}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1

m_ReflectionProbeUsage: 3
m_RayTracingMode: 2
m_RendererPriority: 0
- {fileID: 2100000, guid: 65362f8b29e996742896ce4dd8a6d723, type: 2}
- {fileID: 2100000, guid: 7e3016a4668af4ed0879281ab8cfda9b, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0

m_ScaleInLightmap: 0
m_ReceiveGI: 2
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &33200168467422702
MeshFilter:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1647010619881864}
m_Mesh: {fileID: 4300000, guid: 9dc2c8e7b43dea544b62b08ed3253a04, type: 3}
--- !u!33 &33890458534892234
MeshFilter:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1878461291207564}
m_Mesh: {fileID: 4300002, guid: 9dc2c8e7b43dea544b62b08ed3253a04, type: 3}
--- !u!205 &205557823479122812
LODGroup:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1402090239586902}
serializedVersion: 2
m_LocalReferencePoint: {x: 0.6400001, y: 3.24, z: 1.0499997}
m_Size: 7.9199996
m_FadeMode: 1
m_AnimateCrossFading: 1
m_LODs:
- screenRelativeHeight: 0.3461439
fadeTransitionWidth: 0.25
renderers:
- renderer: {fileID: 23843777350365382}
- screenRelativeHeight: 0.048097678
fadeTransitionWidth: 0.25
renderers:
- renderer: {fileID: 23338955538967662}
m_Enabled: 1

2
Assets/Objects/environment/Trees/Prefabs/Palm_02.prefab


m_LocalReferencePoint: {x: 0.4105785, y: 4.903183, z: 0.061512947}
m_Size: 9.898365
m_FadeMode: 1
m_AnimateCrossFading: 1
m_AnimateCrossFading: 0
m_LastLODIsBillboard: 0
m_LODs:
- screenRelativeHeight: 0.3461439

2
Assets/Objects/environment/Trees/Prefabs/Palm_03.prefab


m_LocalReferencePoint: {x: 0.43711233, y: 2.6962264, z: -2.170663}
m_Size: 6.020765
m_FadeMode: 1
m_AnimateCrossFading: 1
m_AnimateCrossFading: 0
m_LastLODIsBillboard: 0
m_LODs:
- screenRelativeHeight: 0.3461439

2
Assets/Shaders/Vegetation/LODCrossfade.hlsl


void LODCrossfade_float(float3 fadeMaskSeed, out float Out)
{
LODDitheringTransition(fadeMaskSeed, unity_LODFade.x);
Out = 0;
Out = 1;
}
#endif

124
Assets/Shaders/Vegetation/Vegetation.shadergraph
文件差异内容过多而无法显示
查看文件

16
Assets/Textures/normalNoise.png.meta


allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 256

allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []

73
Assets/scenes/Island.unity


m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 1
m_FogColor: {r: 1.076271, g: 1.0390205, b: 0.7361599, a: 1}
m_FogColor: {r: 1.07954, g: 1.0508586, b: 0.75392914, a: 1}
m_AmbientSkyColor: {r: 0.7215085, g: 0.68709767, b: 0.6194611, a: 1}
m_AmbientSkyColor: {r: 0.7261502, g: 0.69231296, b: 0.6258037, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1

- target: {fileID: 7357475664972103680, guid: 860f73418635b430596220c04821a36c,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.26387304
value: 0.26273656
objectReference: {fileID: 0}
- target: {fileID: 7357475664972103680, guid: 860f73418635b430596220c04821a36c,
type: 3}

- target: {fileID: 7357475664972103680, guid: 860f73418635b430596220c04821a36c,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.9645574
value: 0.96486765
objectReference: {fileID: 0}
- target: {fileID: 642770860795607900, guid: 860f73418635b430596220c04821a36c,
type: 3}

type: 3}
m_PrefabInstance: {fileID: 6589000189408555943}
m_PrefabAsset: {fileID: 0}
--- !u!28 &370486874
Texture2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 128
m_Height: 4
m_CompleteImageSize: 2048
m_TextureFormat: 5
m_MipCount: 1
m_IsReadable: 1
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
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: 2048
_typelessdata: ffcfffffffa9f8f8ff83f0f0ff5ee9e9ff38e1e1ff22dcdcff21d8d9ff20d5d6ff1fd2d2ff1ececfff1dcbccff1cc8c9ff1bc4c5ff1ac1c2ff19bdbfff18babcff17b7b9ff16b3b5ff15b0b2ff14adafff13a9acff12a6a9ff11a2a5ff109fa2ff0f9c9fff0e989cff0d9599ff0c9295ff0b8e92ff0a8b8fff09878cff088489ff078185ff067d82ff057c81ff057a81ff057880ff057780ff05757fff05747fff04727eff04707eff046f7dff046d7dff046c7cff046a7cff03687bff03677bff03657aff03647aff036279ff036079ff025f78ff025d78ff025c77ff025a77ff025876ff025776ff025575ff015475ff015274ff015074ff014f73ff014d73ff014c72ff004a71ff004871ff004770ff00466fff00446dff00436cff00426aff004168ff004066ff003f64ff003d62ff003c60ff003b5fff003a5dff00395bff003859ff003657ff003555ff003453ff003352ff003250ff00314eff00304cff002e4aff002d48ff002c46ff002b45ff002a43ff002941ff00273fff00263dff00253bff002439ff002338ff002236ff002034ff001f32ff001e30ff001d2eff001c2cff001b2bff001929ff001827ff001725ff001623ff001521ff001420ff00131eff00111cff00101aff000f18ff000e16ff000d14ff000c13ff000a11ff00090fff00080dff00070bff000609ff000507ff000306ff000204ff000102ff2f3c38ff2f3e39ff2f3f3bff30413cff30423eff304440ff314541ff314743ff314844ff324a46ff324b47ff324c49ff324e4bff334f4cff33514eff33524fff345451ff345552ff345754ff355856ff355a57ff355b59ff355d5aff365e5cff36605eff36615fff376361ff376462ff376664ff386765ff386967ff386a69ff396c6aff396d6cff396f6dff39706fff3a7270ff3a7372ff3a7574ff3b7675ff3b7877ff3b7978ff3c7b7aff3b7b7aff3b7a7aff3b7a7aff3a7a7aff3a7a7aff3a7a7aff39797aff39797aff38797aff38797aff38797aff37787aff37787aff37787aff36787aff36787aff36787aff35777aff35777aff35777aff34777aff34777aff34767aff33767aff33767aff33767aff32767aff32757aff31757aff31757aff31757aff30757aff30747aff30747aff2f747aff2f747aff2f747aff2e747aff2e737aff2e737aff2d737aff2d737aff2d737aff2c727aff2c727aff2c727aff2b727aff2b727aff2a717aff2a717aff2a717aff29717aff29717aff29717aff28707aff28707aff28707aff27707aff27707aff276f7aff266f7bff266f7bff266f7bff256f7bff256e7bff256e7bff246e7bff246e7bff236e7bff236e7bff236d7bff226d7bff226d7bff226d7bff216d7bff216c7bff216c7bff206c7bff206c7bff206c7bff1f6b7bff1f6b7bff1f6b7bff1e6b7bff1e6b7bff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000002ff000004ff000007ff00000aff00000eff000011ff000014ff000019ff00001dff000020ff000025ff000029ff00002eff000033ff000038ff00003dff000042ff000048ff00004dff000052ff000059ff00005eff000065ff00006bff000071ff000078ff00007eff000085ff00008cff000093ff00009aff0000a0ff0000a8ff0000aeff0003b6ff0006bcff000ac4ff000fcaff0013d1ff0018d8ff001ddeff0021e5ff0026ebff002bf1ff0030f7ff0036fcff003bffff0041fbff0047f8ff004cf4ff0053f0ff0059ecff005fe7ff0065e2ff006cddff0073d9ff0079d4ff007fcfff0086caff008dc4ff0093bfff009ab9ff00a0b4ff00a7aeff00ada8ff00b4a2ff00ba9cff00c196ff00c790ff03cd8aff08d484ff0eda7eff13e078ff19e671ff1eeb6cff24f165ff2bf65fff31fc59ff37ff53ff3ffc4cff45f947ff4cf541ff53f13aff5aed35ff61e92fff69e52aff70e024ff77dc1fff7ed71aff86d214ff8ecd0fff96c80aff9dc305ffa4bf01ffabba00ffb2b500ffb9b000ffc1ab00ffc7a700ffcea200ffd49e00ffdb9900ffe19500ffe89000ffee8c00fff38900fff88500fffc8200fffc8200fffc8200fffc8200fffc8200fffc8200fffc8200fffc8200fffc8200fffc8200fffc8200fffc8200fffc8200fffc82000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
m_StreamData:
offset: 0
size: 0
path:
--- !u!1 &471032674
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 471032674}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -68.75, y: -0.25, z: 81.25}
m_LocalPosition: {x: -93.75, y: -0.25, z: 81.25}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}

m_EditorClassIdentifier:
computeOverride: 1
_bakedDepthTex: {fileID: 2800000, guid: 93bf4e51726633144823e135b668c836, type: 3}
_rampTexture: {fileID: 370486874}
_waves:
- amplitude: 0.22704089
direction: -88.46054

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1017609894}
m_LocalRotation: {x: -0.009748473, y: 0.95066756, z: 0.029859738, w: 0.30861723}
m_LocalPosition: {x: -79.8, y: 9.9, z: 91.8}
m_LocalRotation: {x: 0.008164481, y: 0.9336439, z: -0.02129777, w: 0.35747582}
m_LocalPosition: {x: -104.53597, y: 10.854617, z: 90.81176}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2061336191}
m_LocalRotation: {x: -0.009748473, y: 0.95066756, z: 0.029859738, w: 0.30861723}
m_LocalPosition: {x: -79.8, y: 9.9, z: 91.8}
m_LocalRotation: {x: 0.008164481, y: 0.9336439, z: -0.02129777, w: 0.35747582}
m_LocalPosition: {x: -104.53597, y: 10.854617, z: 90.81176}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1873663219}

- target: {fileID: 7096263784801332180, guid: e70416e3bc35d4004a9981d0ac102ba5,
type: 3}
propertyPath: m_Color.g
value: 0.8058285
value: 0.80854815
value: 0.54865235
value: 0.55412185
value: 0.9926642
value: 0.9927781
objectReference: {fileID: 0}
- target: {fileID: 7096263784801332180, guid: e70416e3bc35d4004a9981d0ac102ba5,
type: 3}

- target: {fileID: 8115735017685696522, guid: e70416e3bc35d4004a9981d0ac102ba5,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.6187537
value: -0.61964995
value: -0.3382969
value: -0.34489998
value: 0.7022055
value: 0.69898593
value: 0.09801313
value: 0.092177205
objectReference: {fileID: 0}
- target: {fileID: 6589000190219289651, guid: e70416e3bc35d4004a9981d0ac102ba5,
type: 3}

2
Packages/com.verasl.water-system/Scripts/Rendering/PlanarReflections.cs


var max = QualitySettings.maximumLODLevel;
var bias = QualitySettings.lodBias;
QualitySettings.maximumLODLevel = 1;
QualitySettings.lodBias = bias * 0.25f;
QualitySettings.lodBias = bias * 0.5f;
if (beginPlanarReflections != null) beginPlanarReflections(context, m_ReflectionCamera);
UniversalRenderPipeline.RenderSingleCamera(context, m_ReflectionCamera);

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


public void GenerateColorRamp()
{
if(_rampTexture == null)
_rampTexture = new Texture2D(128, 4, DefaultFormat.LDR, TextureCreationFlags.None);
_rampTexture = new Texture2D(128, 4, GraphicsFormat.R8G8B8A8_SRGB, TextureCreationFlags.None);
_rampTexture.wrapMode = TextureWrapMode.Clamp;
Texture2D _defaultFoamRamp = resources.defaultFoamRamp;

8
Assets/Objects/environment/Trees/Meshes.meta


fileFormatVersion: 2
guid: 6135bd68fb364447db4649ceded9db8b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

406
Assets/Shaders/Skybox-Procedural-Universal.shader


// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
Shader "BoatAttack/Procedural Sky" {
Properties {
[KeywordEnum(None, Simple, High Quality)] _SunDisk ("Sun", Int) = 2
_SunSize ("Sun Size", Range(0,1)) = 0.04
_SunSizeConvergence("Sun Size Convergence", Range(1,10)) = 5
_AtmosphereThickness ("Atmosphere Thickness", Range(0,5)) = 1.0
_SkyTint ("Sky Tint", Color) = (.5, .5, .5, 1)
_GroundColor ("Ground", Color) = (.369, .349, .341, 1)
_Exposure("Exposure", Range(0, 8)) = 1.3
}
SubShader {
Tags { "Queue"="Background" "RenderType"="Background" "PreviewType"="Skybox" }
Cull Off ZWrite Off
Pass {
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
#pragma multi_compile_local _SUNDISK_NONE _SUNDISK_SIMPLE _SUNDISK_HIGH_QUALITY
uniform half _Exposure; // HDR exposure
uniform half3 _GroundColor;
uniform half _SunSize;
uniform half _SunSizeConvergence;
uniform half3 _SkyTint;
uniform half _AtmosphereThickness;
#if defined(UNITY_COLORSPACE_GAMMA)
#define GAMMA 2
#define COLOR_2_GAMMA(color) color
#define COLOR_2_LINEAR(color) color*color
#define LINEAR_2_OUTPUT(color) sqrt(color)
#else
#define GAMMA 2.2
// HACK: to get gfx-tests in Gamma mode to agree until UNITY_ACTIVE_COLORSPACE_IS_GAMMA is working properly
#define COLOR_2_GAMMA(color) pow(color,1.0/GAMMA)
#define COLOR_2_LINEAR(color) color
#define LINEAR_2_LINEAR(color) color
#endif
// RGB wavelengths
// .35 (.62=158), .43 (.68=174), .525 (.75=190)
static const float3 kDefaultScatteringWavelength = float3(.65, .57, .475);
static const float3 kVariableRangeForScatteringWavelength = float3(.15, .15, .15);
#define OUTER_RADIUS 1.025
static const float kOuterRadius = OUTER_RADIUS;
static const float kOuterRadius2 = OUTER_RADIUS*OUTER_RADIUS;
static const float kInnerRadius = 1.0;
static const float kInnerRadius2 = 1.0;
static const float kCameraHeight = 0.0001;
#define kRAYLEIGH (lerp(0.0, 0.0025, pow(_AtmosphereThickness,2.5))) // Rayleigh constant
#define kMIE 0.0010 // Mie constant
#define kSUN_BRIGHTNESS 20.0 // Sun brightness
#define kMAX_SCATTER 50.0 // Maximum scattering value, to prevent math overflows on Adrenos
static const half kHDSundiskIntensityFactor = 15.0;
static const half kSimpleSundiskIntensityFactor = 27.0;
static const half kSunScale = 400.0 * kSUN_BRIGHTNESS;
static const float kKmESun = kMIE * kSUN_BRIGHTNESS;
static const float kKm4PI = kMIE * 4.0 * 3.14159265;
static const float kScale = 1.0 / (OUTER_RADIUS - 1.0);
static const float kScaleDepth = 0.25;
static const float kScaleOverScaleDepth = (1.0 / (OUTER_RADIUS - 1.0)) / 0.25;
static const float kSamples = 2.0; // THIS IS UNROLLED MANUALLY, DON'T TOUCH
#define MIE_G (-0.990)
#define MIE_G2 0.9801
#define SKY_GROUND_THRESHOLD 0.02
// fine tuning of performance. You can override defines here if you want some specific setup
// or keep as is and allow later code to set it according to target api
// if set vprog will output color in final color space (instead of linear always)
// in case of rendering in gamma mode that means that we will do lerps in gamma mode too, so there will be tiny difference around horizon
// #define SKYBOX_COLOR_IN_TARGET_COLOR_SPACE 0
// sun disk rendering:
// no sun disk - the fastest option
#define SKYBOX_SUNDISK_NONE 0
// simplistic sun disk - without mie phase function
#define SKYBOX_SUNDISK_SIMPLE 1
// full calculation - uses mie phase function
#define SKYBOX_SUNDISK_HQ 2
// uncomment this line and change SKYBOX_SUNDISK_SIMPLE to override material settings
// #define SKYBOX_SUNDISK SKYBOX_SUNDISK_SIMPLE
#ifndef SKYBOX_SUNDISK
#if defined(_SUNDISK_NONE)
#define SKYBOX_SUNDISK SKYBOX_SUNDISK_NONE
#elif defined(_SUNDISK_SIMPLE)
#define SKYBOX_SUNDISK SKYBOX_SUNDISK_SIMPLE
#else
#define SKYBOX_SUNDISK SKYBOX_SUNDISK_HQ
#endif
#endif
#ifndef SKYBOX_COLOR_IN_TARGET_COLOR_SPACE
#if defined(SHADER_API_MOBILE)
#define SKYBOX_COLOR_IN_TARGET_COLOR_SPACE 1
#else
#define SKYBOX_COLOR_IN_TARGET_COLOR_SPACE 0
#endif
#endif
// Calculates the Rayleigh phase function
half getRayleighPhase(half eyeCos2)
{
return 0.75 + 0.75*eyeCos2;
}
half getRayleighPhase(half3 light, half3 ray)
{
half eyeCos = dot(light, ray);
return getRayleighPhase(eyeCos * eyeCos);
}
struct appdata_t
{
float4 vertex : POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 pos : SV_POSITION;
#if SKYBOX_SUNDISK == SKYBOX_SUNDISK_HQ
// for HQ sun disk, we need vertex itself to calculate ray-dir per-pixel
float3 vertex : TEXCOORD0;
#elif SKYBOX_SUNDISK == SKYBOX_SUNDISK_SIMPLE
half3 rayDir : TEXCOORD0;
#else
// as we dont need sun disk we need just rayDir.y (sky/ground threshold)
half skyGroundFactor : TEXCOORD0;
#endif
// calculate sky colors in vprog
half3 groundColor : TEXCOORD1;
half3 skyColor : TEXCOORD2;
#if SKYBOX_SUNDISK != SKYBOX_SUNDISK_NONE
half3 sunColor : TEXCOORD3;
#endif
UNITY_VERTEX_OUTPUT_STEREO
};
float scale(float inCos)
{
float x = 1.0 - inCos;
return 0.25 * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));
}
v2f vert (appdata_t v)
{
v2f OUT;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
VertexPositionInputs vertexPositions = GetVertexPositionInputs(v.vertex.xyz);
OUT.pos = vertexPositions.positionCS;
float3 kSkyTintInGammaSpace = COLOR_2_GAMMA(_SkyTint); // convert tint from Linear back to Gamma
float3 kScatteringWavelength = lerp (
kDefaultScatteringWavelength-kVariableRangeForScatteringWavelength,
kDefaultScatteringWavelength+kVariableRangeForScatteringWavelength,
half3(1,1,1) - kSkyTintInGammaSpace); // using Tint in sRGB gamma allows for more visually linear interpolation and to keep (.5) at (128, gray in sRGB) point
float3 kInvWavelength = 1.0 / pow(kScatteringWavelength, 4);
float kKrESun = kRAYLEIGH * kSUN_BRIGHTNESS;
float kKr4PI = kRAYLEIGH * 4.0 * 3.14159265;
float3 cameraPos = float3(0,kInnerRadius + kCameraHeight,0); // The camera's current position
// Get the ray from the camera to the vertex and its length (which is the far point of the ray passing through the atmosphere)
float3 eyeRay = normalize(mul((float3x3)unity_ObjectToWorld, v.vertex.xyz));
float far = 0.0;
half3 cIn, cOut;
Light mainLight = GetMainLight();
if(eyeRay.y >= 0.0)
{
// Sky
// Calculate the length of the "atmosphere"
far = sqrt(kOuterRadius2 + kInnerRadius2 * eyeRay.y * eyeRay.y - kInnerRadius2) - kInnerRadius * eyeRay.y;
float3 pos = cameraPos + far * eyeRay;
// Calculate the ray's starting position, then calculate its scattering offset
float height = kInnerRadius + kCameraHeight;
float depth = exp(kScaleOverScaleDepth * (-kCameraHeight));
float startAngle = dot(eyeRay, cameraPos) / height;
float startOffset = depth*scale(startAngle);
// Initialize the scattering loop variables
float sampleLength = far / kSamples;
float scaledLength = sampleLength * kScale;
float3 sampleRay = eyeRay * sampleLength;
float3 samplePoint = cameraPos + sampleRay * 0.5;
// Now loop through the sample rays
float3 frontColor = float3(0.0, 0.0, 0.0);
// Weird workaround: WP8 and desktop FL_9_3 do not like the for loop here
// (but an almost identical loop is perfectly fine in the ground calculations below)
// Just unrolling this manually seems to make everything fine again.
// for(int i=0; i<int(kSamples); i++)
{
float height = length(samplePoint);
float depth = exp(kScaleOverScaleDepth * (kInnerRadius - height));
float lightAngle = dot(mainLight.direction, samplePoint) / height;
float cameraAngle = dot(eyeRay, samplePoint) / height;
float scatter = (startOffset + depth*(scale(lightAngle) - scale(cameraAngle)));
float3 attenuate = exp(-clamp(scatter, 0.0, kMAX_SCATTER) * (kInvWavelength * kKr4PI + kKm4PI));
frontColor += attenuate * (depth * scaledLength);
samplePoint += sampleRay;
}
{
float height = length(samplePoint);
float depth = exp(kScaleOverScaleDepth * (kInnerRadius - height));
float lightAngle = dot(mainLight.direction, samplePoint) / height;
float cameraAngle = dot(eyeRay, samplePoint) / height;
float scatter = (startOffset + depth*(scale(lightAngle) - scale(cameraAngle)));
float3 attenuate = exp(-clamp(scatter, 0.0, kMAX_SCATTER) * (kInvWavelength * kKr4PI + kKm4PI));
frontColor += attenuate * (depth * scaledLength);
samplePoint += sampleRay;
}
// Finally, scale the Mie and Rayleigh colors and set up the varying variables for the pixel shader
cIn = frontColor * (kInvWavelength * kKrESun);
cOut = frontColor * kKmESun;
}
else
{
// Ground
far = (-kCameraHeight) / (min(-0.001, eyeRay.y));
float3 pos = cameraPos + far * eyeRay;
// Calculate the ray's starting position, then calculate its scattering offset
float depth = exp((-kCameraHeight) * (1.0/kScaleDepth));
float cameraAngle = dot(-eyeRay, pos);
float lightAngle = dot(mainLight.direction, pos);
float cameraScale = scale(cameraAngle);
float lightScale = scale(lightAngle);
float cameraOffset = depth*cameraScale;
float temp = (lightScale + cameraScale);
// Initialize the scattering loop variables
float sampleLength = far / kSamples;
float scaledLength = sampleLength * kScale;
float3 sampleRay = eyeRay * sampleLength;
float3 samplePoint = cameraPos + sampleRay * 0.5;
// Now loop through the sample rays
float3 frontColor = float3(0.0, 0.0, 0.0);
float3 attenuate;
// for(int i=0; i<int(kSamples); i++) // Loop removed because we kept hitting SM2.0 temp variable limits. Doesn't affect the image too much.
{
float height = length(samplePoint);
float depth = exp(kScaleOverScaleDepth * (kInnerRadius - height));
float scatter = depth*temp - cameraOffset;
attenuate = exp(-clamp(scatter, 0.0, kMAX_SCATTER) * (kInvWavelength * kKr4PI + kKm4PI));
frontColor += attenuate * (depth * scaledLength);
samplePoint += sampleRay;
}
cIn = frontColor * (kInvWavelength * kKrESun + kKmESun);
cOut = clamp(attenuate, 0.0, 1.0);
}
#if SKYBOX_SUNDISK == SKYBOX_SUNDISK_HQ
OUT.vertex = -v.vertex;
#elif SKYBOX_SUNDISK == SKYBOX_SUNDISK_SIMPLE
OUT.rayDir = half3(-eyeRay);
#else
OUT.skyGroundFactor = -eyeRay.y / SKY_GROUND_THRESHOLD;
#endif
// if we want to calculate color in vprog:
// 1. in case of linear: multiply by _Exposure in here (even in case of lerp it will be common multiplier, so we can skip mul in fshader)
// 2. in case of gamma and SKYBOX_COLOR_IN_TARGET_COLOR_SPACE: do sqrt right away instead of doing that in fshader
OUT.groundColor = _Exposure * (cIn + COLOR_2_LINEAR(_GroundColor) * cOut);
OUT.skyColor = _Exposure * (cIn * getRayleighPhase(mainLight.direction, -eyeRay));
#if SKYBOX_SUNDISK != SKYBOX_SUNDISK_NONE
// The sun should have a stable intensity in its course in the sky. Moreover it should match the highlight of a purely specular material.
// This matching was done using the standard shader BRDF1 on the 5/31/2017
// Finally we want the sun to be always bright even in LDR thus the normalization of the lightColor for low intensity.
half lightColorIntensity = clamp(length(mainLight.color), 0.25, 1);
#if SKYBOX_SUNDISK == SKYBOX_SUNDISK_SIMPLE
OUT.sunColor = kSimpleSundiskIntensityFactor * saturate(cOut * kSunScale) * mainLight.color / lightColorIntensity;
#else // SKYBOX_SUNDISK_HQ
OUT.sunColor = kHDSundiskIntensityFactor * saturate(cOut) * mainLight.color / lightColorIntensity;
#endif
#endif
#if defined(UNITY_COLORSPACE_GAMMA) && SKYBOX_COLOR_IN_TARGET_COLOR_SPACE
OUT.groundColor = sqrt(OUT.groundColor);
OUT.skyColor = sqrt(OUT.skyColor);
#if SKYBOX_SUNDISK != SKYBOX_SUNDISK_NONE
OUT.sunColor= sqrt(OUT.sunColor);
#endif
#endif
return OUT;
}
// Calculates the Mie phase function
half getMiePhase(half eyeCos, half eyeCos2)
{
half temp = 1.0 + MIE_G2 - 2.0 * MIE_G * eyeCos;
temp = pow(temp, pow(_SunSize,0.65) * 10);
temp = max(temp,1.0e-4); // prevent division by zero, esp. in half precision
temp = 1.5 * ((1.0 - MIE_G2) / (2.0 + MIE_G2)) * (1.0 + eyeCos2) / temp;
#if defined(UNITY_COLORSPACE_GAMMA) && SKYBOX_COLOR_IN_TARGET_COLOR_SPACE
temp = pow(temp, .454545);
#endif
return temp;
}
// Calculates the sun shape
half calcSunAttenuation(half3 lightPos, half3 ray)
{
#if SKYBOX_SUNDISK == SKYBOX_SUNDISK_SIMPLE
half3 delta = lightPos - ray;
half dist = length(delta);
half spot = 1.0 - smoothstep(0.0, _SunSize, dist);
return spot * spot;
#else // SKYBOX_SUNDISK_HQ
half focusedEyeCos = pow(saturate(dot(lightPos, ray)), _SunSizeConvergence);
return getMiePhase(-focusedEyeCos, focusedEyeCos * focusedEyeCos);
#endif
}
half4 frag (v2f IN) : SV_Target
{
half3 col = half3(0.0, 0.0, 0.0);
Light mainLight = GetMainLight();
// if y > 1 [eyeRay.y < -SKY_GROUND_THRESHOLD] - ground
// if y >= 0 and < 1 [eyeRay.y <= 0 and > -SKY_GROUND_THRESHOLD] - horizon
// if y < 0 [eyeRay.y > 0] - sky
#if SKYBOX_SUNDISK == SKYBOX_SUNDISK_HQ
half3 ray = normalize(mul((float3x3)unity_ObjectToWorld, IN.vertex));
half y = ray.y / SKY_GROUND_THRESHOLD;
#elif SKYBOX_SUNDISK == SKYBOX_SUNDISK_SIMPLE
half3 ray = IN.rayDir.xyz;
half y = ray.y / SKY_GROUND_THRESHOLD;
#else
half y = IN.skyGroundFactor;
#endif
// if we did precalculate color in vprog: just do lerp between them
col = lerp(IN.skyColor, IN.groundColor, saturate(y));
#if SKYBOX_SUNDISK != SKYBOX_SUNDISK_NONE
if(y < 0.0)
{
col += IN.sunColor * calcSunAttenuation(mainLight.direction, -ray);
}
#endif
#if defined(UNITY_COLORSPACE_GAMMA) && !SKYBOX_COLOR_IN_TARGET_COLOR_SPACE
col = LINEAR_2_OUTPUT(col);
#endif
return half4(clamp(col, 0, 100),1.0);
}
ENDHLSL
}
}
Fallback Off
CustomEditor "SkyboxProceduralShaderGUI"
}

9
Assets/Shaders/Skybox-Procedural-Universal.shader.meta


fileFormatVersion: 2
guid: 375dd840ed8484cb68923f5aebe560fe
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

297
Assets/Shaders/UtilityGraphs/DitherCrossfade.shadersubgraph
文件差异内容过多而无法显示
查看文件

10
Assets/Shaders/UtilityGraphs/DitherCrossfade.shadersubgraph.meta


fileFormatVersion: 2
guid: f1df8861f851d47f29565b6d916a4ed9
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

/Assets/Objects/environment/Trees/Palm_01.fbx → /Assets/Objects/environment/Trees/Meshes/Palm_01.fbx

/Assets/Objects/environment/Trees/Palm_01.fbx.meta → /Assets/Objects/environment/Trees/Meshes/Palm_01.fbx.meta

/Assets/Objects/environment/Trees/Palm_02.fbx → /Assets/Objects/environment/Trees/Meshes/Palm_02.fbx

/Assets/Objects/environment/Trees/Palm_02.fbx.meta → /Assets/Objects/environment/Trees/Meshes/Palm_02.fbx.meta

/Assets/Objects/environment/Trees/Palm_03.fbx → /Assets/Objects/environment/Trees/Meshes/Palm_03.fbx

/Assets/Objects/environment/Trees/Palm_03.fbx.meta → /Assets/Objects/environment/Trees/Meshes/Palm_03.fbx.meta

/Assets/Objects/environment/Trees/Bush_Large_01.fbx → /Assets/Objects/environment/Trees/Meshes/Bush_Large_01.fbx

/Assets/Objects/environment/Trees/Bush_Large_01.fbx.meta → /Assets/Objects/environment/Trees/Meshes/Bush_Large_01.fbx.meta

/Assets/Objects/environment/Trees/PalmB_01.fbx → /Assets/Objects/environment/Trees/Meshes/PalmB_01.fbx

/Assets/Objects/environment/Trees/PalmB_01.fbx.meta → /Assets/Objects/environment/Trees/Meshes/PalmB_01.fbx.meta

/Assets/Objects/environment/Trees/PalmB_02.fbx → /Assets/Objects/environment/Trees/Meshes/PalmB_02.fbx

/Assets/Objects/environment/Trees/PalmB_02.fbx.meta → /Assets/Objects/environment/Trees/Meshes/PalmB_02.fbx.meta

/Assets/Objects/environment/Trees/bush_A.fbx → /Assets/Objects/environment/Trees/Meshes/bush_A.fbx

/Assets/Objects/environment/Trees/bush_A.fbx.meta → /Assets/Objects/environment/Trees/Meshes/bush_A.fbx.meta

/Assets/Objects/environment/Trees/grass_clump.fbx → /Assets/Objects/environment/Trees/Meshes/grass_clump.fbx

/Assets/Objects/environment/Trees/grass_clump.fbx.meta → /Assets/Objects/environment/Trees/Meshes/grass_clump.fbx.meta

/Assets/Objects/environment/Trees/small_tree_B.fbx → /Assets/Objects/environment/Trees/Meshes/small_tree_B.fbx

/Assets/Objects/environment/Trees/small_tree_B.fbx.meta → /Assets/Objects/environment/Trees/Meshes/small_tree_B.fbx.meta

/Assets/Objects/environment/Trees/small_tree_A.fbx → /Assets/Objects/environment/Trees/Meshes/small_tree_A.fbx

/Assets/Objects/environment/Trees/small_tree_A.fbx.meta → /Assets/Objects/environment/Trees/Meshes/small_tree_A.fbx.meta

正在加载...
取消
保存