浏览代码

Upped shadow resolution

Turned stripping back on
Turned on MSAA, turned off FXAA
Added new Cascade keyword
Moved Texture2DArray script back into an editor folder
Cleaned up some old files
Updated submodule
/main
Andre McGrail 7 年前
当前提交
c7f157b7
共有 13 个文件被更改,包括 49 次插入413 次删除
  1. 6
      Assets/LightweightAsset.asset
  2. 2
      Assets/Scripts/Editor.meta
  3. 1
      Assets/Shaders/LWVegetationShader.shader
  4. 120
      Assets/scenes/Island.unity
  5. 84
      Assets/Shaders/LWBasicTess.mat
  6. 8
      Assets/Shaders/LWBasicTess.mat.meta
  7. 127
      Assets/Shaders/LWBasicTess.shader
  8. 9
      Assets/Shaders/LWBasicTess.shader.meta
  9. 97
      Assets/Shaders/metaTest.mat
  10. 8
      Assets/Shaders/metaTest.mat.meta
  11. 0
      /Assets/Scripts/Editor/CreateTexture2DArrayAsset.cs
  12. 0
      /Assets/Scripts/Editor/CreateTexture2DArrayAsset.cs.meta

6
Assets/LightweightAsset.asset


m_RequireOpaqueTexture: 1
m_OpaqueDownsampling: 1
m_SupportsHDR: 0
m_MSAA: 1
m_MSAA: 2
m_ShadowAtlasResolution: 2048
m_ShadowAtlasResolution: 4096
m_ShadowDistance: 250
m_ShadowCascades: 0
m_Cascade2Split: 0.25

m_SoftShadowsSupported: 1
m_CustomShaderVariantStrippingSettings: 1
m_CustomShaderVariantStrippingSettings: 0
m_KeepAdditionalLightVariants: 1
m_KeepVertexLightVariants: 1
m_KeepDirectionalShadowVariants: 1

2
Assets/Scripts/Editor.meta


fileFormatVersion: 2
guid: e47583aacb21f40cd9921e167e74c11a
guid: 26c599c9e2144492c809158812f1a073
folderAsset: yes
DefaultImporter:
externalObjects: {}

1
Assets/Shaders/LWVegetationShader.shader


#pragma multi_compile _ _VERTEX_LIGHTS
#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
#pragma multi_compile _ _SHADOWS_ENABLED
#pragma multi_compile _ _SHADOWS_CASCADE
// -------------------------------------
// Unity defined keywords

120
Assets/scenes/Island.unity


m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1442025832}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 56.25, y: 0, z: 200}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 539384202}

m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 153441711}
m_LocalRotation: {x: 0.0035860853, y: -0.9274155, z: 0.10296594, w: 0.35956326}
m_LocalRotation: {x: 0.0035863272, y: -0.9274147, z: 0.10296577, w: 0.35956538}
m_LocalPosition: {x: -30.883488, y: 3.60433, z: -57.710354}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 372c59520c69cff4498f2d5d0e7b6c7c, type: 2}
m_IsPrefabAsset: 0
--- !u!28 &429309384
Texture2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {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: ffffffffffe9fcfcffd4f8f8ffbef5f5ffa8f2f2ff93eeeeff7debebff67e8e8ff51e4e4ff3ce1e1ff26dedeff22dbdbff21d8d8ff20d4d5ff1fd1d2ff1ececfff1dcbccff1cc8c9ff1bc5c6ff1ac1c3ff19bec0ff18bbbdff17b8baff16b5b7ff15b2b4ff14aeb1ff13abaeff12a8abff12a5a8ff11a2a5ff109fa2ff0f9c9fff0e989cff0d9599ff0c9296ff0b8f93ff0a8c90ff09898dff08858aff078287ff067f84ff057d82ff057b81ff057a81ff057981ff057880ff057680ff05757fff05747fff04737fff04727eff04707eff046f7dff046e7dff046d7dff046b7cff046a7cff03697bff03687bff03667bff03657aff03647aff036379ff036179ff036079ff025f78ff025e78ff025d77ff025b77ff025a77ff025976ff025876ff025675ff025575ff015475ff015374ff015174ff015073ff014f73ff014e73ff014c72ff014b72ff004a71ff004971ff004871ff004670ff00456eff00436bff004169ff004066ff003e63ff003d61ff003b5eff00395cff003859ff003656ff003454ff003351ff00314eff002f4cff002e49ff002c47ff002b44ff002941ff00273fff00263cff00243aff002237ff002134ff001f32ff001d2fff001c2cff001a2aff001927ff001725ff001522ff00141fff00121dff00101aff000f18ff000d15ff000b12ff000a10ff00080dff00070aff000508ff000305ff000203ff000000ff010505ff020b09ff03100eff041612ff051b17ff06211bff072620ff092c24ff0a3129ff0b362dff0c3c32ff0d4136ff0e473bff0f4c3fff105244ff115748ff125d4dff136251ff146756ff156957ff156957ff156a58ff156a58ff166a58ff166b58ff166b59ff166c59ff176c59ff176c5aff176d5aff176d5aff186d5bff186e5bff186e5bff196f5cff196f5cff196f5cff19705cff1a705dff1a715dff1a715dff1a715eff1b725eff1b725eff1b725fff1b735fff1c735fff1c745fff1c7460ff1c7460ff1d7560ff1d7561ff1d7661ff1d7661ff1e7662ff1e7663ff1e7764ff1e7765ff1e7766ff1e7766ff1e7867ff1e7868ff1e7869ff1e796aff1e796bff1e796bff1e796cff1e7a6dff1e7a6eff1e7a6fff1e7a70ff1e7b70ff1e7b71ff1e7b72ff1e7b73ff1e7c74ff1e7c74ff1e7c75ff1e7c76ff1e7d77ff1e7d78ff1f7d79ff1f7d79ff1f7e7aff1f7e7bff1f7e7cff1f7e7dff1f7f7eff1f7f7eff1f7f7fff1f7f80ff1f8081ff1f8082ff1f8083ff1f8083ff1f8184ff1f8185ff1f8186ff1f8187ff1f8288ff1f8288ff1f8289ff1f838aff1f838bff1f838cff1f838dff1f848dff1f848eff20848fff208490ff208591ff208592ff208592ff208593ff208694ff208695ff208696ff208696ff208797ff208798ff208799ff20879aff20889bff20889bff20889cff20889dff20899eff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000009ff000018ff000028ff000039ff00004aff00005aff00006aff00007aff00008aff000099ff0000a7ff0002b5ff0009c1ff0011cdff0018d8ff001fe2ff0026ebff002ef4ff0035fbff003cffff0043faff004af6ff0050f2ff0056edff005ce9ff0062e5ff0067e1ff006edcff0073d9ff0078d5ff007dd1ff0081ceff0085caff0089c7ff008ec3ff0092c0ff0095bdff0099baff009cb7ff00a0b4ff00a3b2ff00a6afff00a9adff00acaaff00aea7ff00b1a5ff00b3a3ff00b6a1ff00b89eff00bb9bff00be99ff00c097ff00c295ff00c593ff00c790ff00c98eff02cc8cff04ce89ff05d087ff07d385ff0ad682ff0cd880ff0eda7dff11dd7aff14e077ff16e375ff19e671ff1ce96eff1fec6bff22ef67ff26f264ff2af560ff2df85cff32fd58ff36ff54ff3bfe4fff40fb4bff45f947ff4bf542ff51f23cff57ef37ff5deb32ff64e72dff6ce328ff73de22ff7bd91cff83d416ff8bcf11ff95c90bff9dc305ffa7bd00ffb1b600ffbaaf00ffc4a900ffcfa2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
m_StreamData:
offset: 0
size: 0
path:
--- !u!1001 &429650737
Prefab:
m_ObjectHideFlags: 0

serializedVersion: 2
m_Bits: 256
stopNaNPropagation: 0
antialiasingMode: 1
antialiasingMode: 0
temporalAntialiasing:
jitterSpread: 0.75
sharpness: 0.25

m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1143740434}
m_LocalRotation: {x: -0.00035605725, y: 0.95918757, z: -0.0012123247, w: -0.282768}
m_LocalRotation: {x: -0.0003582199, y: 0.95919013, z: -0.0012197747, w: -0.282759}
m_LocalPosition: {x: 42, y: 2.51, z: 62.1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

m_CorrespondingSourceObject: {fileID: 4892398858798392, guid: 372c59520c69cff4498f2d5d0e7b6c7c,
type: 2}
m_PrefabInternal: {fileID: 703341110}
--- !u!28 &1337315795
Texture2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {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: ffffffffffe9fcfcffd4f8f8ffbef5f5ffa8f2f2ff93eeeeff7debebff67e8e8ff51e4e4ff3ce1e1ff26dedeff22dbdbff21d8d8ff20d4d5ff1fd1d2ff1ececfff1dcbccff1cc8c9ff1bc5c6ff1ac1c3ff19bec0ff18bbbdff17b8baff16b5b7ff15b2b4ff14aeb1ff13abaeff12a8abff12a5a8ff11a2a5ff109fa2ff0f9c9fff0e989cff0d9599ff0c9296ff0b8f93ff0a8c90ff09898dff08858aff078287ff067f84ff057d82ff057b81ff057a81ff057981ff057880ff057680ff05757fff05747fff04737fff04727eff04707eff046f7dff046e7dff046d7dff046b7cff046a7cff03697bff03687bff03667bff03657aff03647aff036379ff036179ff036079ff025f78ff025e78ff025d77ff025b77ff025a77ff025976ff025876ff025675ff025575ff015475ff015374ff015174ff015073ff014f73ff014e73ff014c72ff014b72ff004a71ff004971ff004871ff004670ff00456eff00436bff004169ff004066ff003e63ff003d61ff003b5eff00395cff003859ff003656ff003454ff003351ff00314eff002f4cff002e49ff002c47ff002b44ff002941ff00273fff00263cff00243aff002237ff002134ff001f32ff001d2fff001c2cff001a2aff001927ff001725ff001522ff00141fff00121dff00101aff000f18ff000d15ff000b12ff000a10ff00080dff00070aff000508ff000305ff000203ff000000ff010505ff020b09ff03100eff041612ff051b17ff06211bff072620ff092c24ff0a3129ff0b362dff0c3c32ff0d4136ff0e473bff0f4c3fff105244ff115748ff125d4dff136251ff146756ff156957ff156957ff156a58ff156a58ff166a58ff166b58ff166b59ff166c59ff176c59ff176c5aff176d5aff176d5aff186d5bff186e5bff186e5bff196f5cff196f5cff196f5cff19705cff1a705dff1a715dff1a715dff1a715eff1b725eff1b725eff1b725fff1b735fff1c735fff1c745fff1c7460ff1c7460ff1d7560ff1d7561ff1d7661ff1d7661ff1e7662ff1e7663ff1e7764ff1e7765ff1e7766ff1e7766ff1e7867ff1e7868ff1e7869ff1e796aff1e796bff1e796bff1e796cff1e7a6dff1e7a6eff1e7a6fff1e7a70ff1e7b70ff1e7b71ff1e7b72ff1e7b73ff1e7c74ff1e7c74ff1e7c75ff1e7c76ff1e7d77ff1e7d78ff1f7d79ff1f7d79ff1f7e7aff1f7e7bff1f7e7cff1f7e7dff1f7f7eff1f7f7eff1f7f7fff1f7f80ff1f8081ff1f8082ff1f8083ff1f8083ff1f8184ff1f8185ff1f8186ff1f8187ff1f8288ff1f8288ff1f8289ff1f838aff1f838bff1f838cff1f838dff1f848dff1f848eff20848fff208490ff208591ff208592ff208592ff208593ff208694ff208695ff208696ff208696ff208797ff208798ff208799ff20879aff20889bff20889bff20889cff20889dff20899eff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000000ff000009ff000018ff000028ff000039ff00004aff00005aff00006aff00007aff00008aff000099ff0000a7ff0002b5ff0009c1ff0011cdff0018d8ff001fe2ff0026ebff002ef4ff0035fbff003cffff0043faff004af6ff0050f2ff0056edff005ce9ff0062e5ff0067e1ff006edcff0073d9ff0078d5ff007dd1ff0081ceff0085caff0089c7ff008ec3ff0092c0ff0095bdff0099baff009cb7ff00a0b4ff00a3b2ff00a6afff00a9adff00acaaff00aea7ff00b1a5ff00b3a3ff00b6a1ff00b89eff00bb9bff00be99ff00c097ff00c295ff00c593ff00c790ff00c98eff02cc8cff04ce89ff05d087ff07d385ff0ad682ff0cd880ff0eda7dff11dd7aff14e077ff16e375ff19e671ff1ce96eff1fec6bff22ef67ff26f264ff2af560ff2df85cff32fd58ff36ff54ff3bfe4fff40fb4bff45f947ff4bf542ff51f23cff57ef37ff5deb32ff64e72dff6ce328ff73de22ff7bd91cff83d416ff8bcf11ff95c90bff9dc305ffa7bd00ffb1b600ffbaaf00ffc4a900ffcfa2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
m_StreamData:
offset: 0
size: 0
path:
--- !u!1 &1341363236
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: b6edb8448c9b94f018953ca2a6fa5891, type: 3}
m_Name:
m_EditorClassIdentifier:
_rampTexture: {fileID: 429309384}
_rampTexture: {fileID: 1337315795}
_waves:
- amplitude: 0.25450218
direction: -167.8483

serializedVersion: 6
m_Component:
- component: {fileID: 1819032312}
- component: {fileID: 1819032313}
m_Layer: 0
m_Name: '---------------Random--------------'
m_TagString: Untagged

m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1819032313
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1819032311}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c109964a5c07f4412ae36709c02956de, type: 3}
m_Name:
m_EditorClassIdentifier:
texFormat: 7
mipmaps: 1
textures:
- {fileID: 2800000, guid: 7f1ef94d4c92a4e1ea6503d4956998c5, type: 3}
- {fileID: 2800000, guid: c5bbe70ebb5ec4f6e909624f0b264efa, type: 3}
- {fileID: 2800000, guid: 5a1ae4c6fbf414937add6da089b0b855, type: 3}
- {fileID: 2800000, guid: 68835a4c28f0a42f2a1a39b612b96588, type: 3}
- {fileID: 2800000, guid: c0e169e27ef4740fa869aea58e90c67f, type: 3}
- {fileID: 2800000, guid: 7d5fa7be83c314bf7bb7a95773faf5ca, type: 3}
- {fileID: 2800000, guid: 19ef48913af134984aaf8845a4f09294, type: 3}
- {fileID: 2800000, guid: 2e5c69bf561f94a4c872042f9299a94f, type: 3}
- {fileID: 2800000, guid: 93a6e3058e1934d85b5a01756fd2398c, type: 3}
- {fileID: 2800000, guid: c66dd1a19f7f949c19c6a154253986c8, type: 3}
- {fileID: 2800000, guid: 5d26ffc2c43a64df28a21ef8f4f3abb0, type: 3}
- {fileID: 2800000, guid: e69374d074db94252b6ac5ee11e37ecc, type: 3}
- {fileID: 2800000, guid: 83433fb2612b7433c8b2f44138af5483, type: 3}
- {fileID: 2800000, guid: a9e17bc39e4e642f79f58d0145f4c64f, type: 3}
- {fileID: 2800000, guid: fc2e8a4c25492434b8a67900b8474997, type: 3}
- {fileID: 2800000, guid: e74c8aa81639e487d82f913022f7509d, type: 3}
cubeMaps: []
--- !u!1 &1821796556
GameObject:
m_ObjectHideFlags: 3

84
Assets/Shaders/LWBasicTess.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: LWBasicTess
m_Shader: {fileID: 4800000, guid: b5d14b5fa694e43f494af0f3b3c8397e, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
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: 0}
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: 0}
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}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _LW: 0
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _TessellationEdgeLength: 35
- _UVSec: 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}

8
Assets/Shaders/LWBasicTess.mat.meta


fileFormatVersion: 2
guid: 0c8c0406dabc64981a61dc943207a18c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

127
Assets/Shaders/LWBasicTess.shader


Shader "Unlit/LWBasicTess"
{
Properties
{
[Toggle(_LW)]
_LW ("LightWeight vs Legacy", Float) = 0
_TessellationEdgeLength ("Tessellation Edge Length", FLoat) = 35
}
SubShader
{
Tags { "RenderType"="Opaque" "RenderPipeline" = "LightweightPipeline"}
LOD 100
Pass
{
HLSLPROGRAM
#pragma vertex vert
#pragma hull hull
#pragma domain domain
#pragma fragment frag
#pragma shader_feature _LW
#ifdef _LW
#include "LWRP/ShaderLibrary/Core.hlsl"
#else
#include "UnityCG.cginc"
#endif
struct appdata
{
float4 vertex : POSITION;
};
struct tessCP
{
float4 vertex : INTERNALTESSPOS;
};
struct HS_ConstantOutput
{
float TessFactor[3] : SV_TessFactor;
float InsideTessFactor : SV_InsideTessFactor;
};
struct v2f
{
float4 vertex : SV_POSITION;
float3 col : TEXCOORD0;
};
//tess//
half _TessellationEdgeLength;
float TessellationEdgeFactor (float3 p0, float3 p1)
{
float edgeLength = distance(p0, p1);
float3 edgeCenter = (p0 + p1) * 0.5;
float viewDistance = 10; // distance(edgeCenter, _WorldSpaceCameraPos);
return edgeLength * _ScreenParams.y / (_TessellationEdgeLength * viewDistance);
}
tessCP vert( appdata Input )
{
tessCP Output;
Output.vertex = Input.vertex;
return Output;
}
HS_ConstantOutput HSConstant( InputPatch<tessCP, 3> Input )
{
float3 p0 = mul(UNITY_MATRIX_M, Input[0].vertex).xyz;
float3 p1 = mul(UNITY_MATRIX_M, Input[1].vertex).xyz;
float3 p2 = mul(UNITY_MATRIX_M, Input[2].vertex).xyz;
HS_ConstantOutput Output = (HS_ConstantOutput)0;
Output.TessFactor[0] = TessellationEdgeFactor(p1, p2);
Output.TessFactor[1] = TessellationEdgeFactor(p2, p0);
Output.TessFactor[2] = TessellationEdgeFactor(p0, p1);
Output.InsideTessFactor = (TessellationEdgeFactor(p1, p2) +
TessellationEdgeFactor(p2, p0) +
TessellationEdgeFactor(p0, p1)) * (1 / 3.0);
return Output;
}
[domain("tri")]
[partitioning("fractional_odd")]
[outputtopology("triangle_cw")]
[patchconstantfunc("HSConstant")]
[outputcontrolpoints(3)]
tessCP hull( InputPatch<tessCP, 3> Input, uint uCPID : SV_OutputControlPointID )
{
return Input[uCPID];
}
////////////////////////////VERT SHADER////////////////////////////
[domain("tri")]
v2f domain( HS_ConstantOutput HSConstantData, const OutputPatch<tessCP, 3> Input, float3 BarycentricCoords : SV_DomainLocation)
{
v2f Output = (v2f)0;
float fU = BarycentricCoords.x;
float fV = BarycentricCoords.y;
float fW = BarycentricCoords.z;
float4 vertex = Input[0].vertex * fU + Input[1].vertex * fV + Input[2].vertex * fW;
vertex.y += sin(_Time.w + vertex.x * 4) * 0.2;
Output.col = vertex.xyz;
#ifdef _LW
Output.vertex = mul(UNITY_MATRIX_VP, mul(UNITY_MATRIX_M, float4(vertex.xyz, 1.0))); //TransformObjectToHClip(vertex);//calculate the vertices for rendering
#else
Output.vertex = mul(UNITY_MATRIX_VP, mul(UNITY_MATRIX_M, float4(vertex.xyz, 1.0))); // UnityObjectToClipPos(vertex);//calculate the vertices for rendering
#endif
return Output;
}
float4 frag (v2f i) : SV_Target
{
float4 col = float4(i.col, 1);
return col;
}
ENDHLSL
}
}
}

9
Assets/Shaders/LWBasicTess.shader.meta


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

97
Assets/Shaders/metaTest.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: metaTest
m_Shader: {fileID: 4800000, guid: 9a018c8a0f3d5466c8cf7db26a32a8fe, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- Texture_2D2A40E:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_4CCF661D:
m_Texture: {fileID: 2800000, guid: b2f21589b3c414cc3a05db416d43897b, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_E3D097C6:
m_Texture: {fileID: 2800000, guid: d389fa646f8a74bae9368b04367ad643, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
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: 0}
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: 0}
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}
m_Floats:
- _AlphaClip: 0
- _Blend: 0
- _BumpScale: 1
- _Cull: 2
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _UVSec: 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}

8
Assets/Shaders/metaTest.mat.meta


fileFormatVersion: 2
guid: 6d95bcd779e2c4adeab8be4e3a1147bf
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

/Assets/Scripts/CreateTexture2DArrayAsset.cs → /Assets/Scripts/Editor/CreateTexture2DArrayAsset.cs

/Assets/Scripts/CreateTexture2DArrayAsset.cs.meta → /Assets/Scripts/Editor/CreateTexture2DArrayAsset.cs.meta

正在加载...
取消
保存