从旧版中移植,Prefab未确认

This commit is contained in:
2025-07-24 15:41:28 +08:00
parent 86842492ea
commit 43b824b722
300 changed files with 101926 additions and 14 deletions

View File

@@ -0,0 +1,39 @@
using UnityEngine;
using UnityEngine.Rendering;
/// <summary>
/// Async shader compilation is disabled for offscreen cameras by default.
/// As all the cameras in the TerminalScene are updating every frame,
/// therefore this script enables async shader compilation for all the cameras in the scene.
/// If you only need to enable async shader compilation for a specific camera,
/// you can use the Begin/EndCameraRendering callbacks instead.
/// </summary>
public class AsyncShaderCompileForCamera : MonoBehaviour
{
#if UNITY_EDITOR
private bool m_PrevState = true;
private void OnEnable()
{
RenderPipelineManager.beginFrameRendering += BeginFrame;
RenderPipelineManager.endFrameRendering += EndFrame;
}
private void OnDisable()
{
RenderPipelineManager.beginFrameRendering -= BeginFrame;
RenderPipelineManager.endFrameRendering -= EndFrame;
}
private void BeginFrame(ScriptableRenderContext context, Camera[] cams)
{
m_PrevState = UnityEditor.ShaderUtil.allowAsyncCompilation;
UnityEditor.ShaderUtil.allowAsyncCompilation = true;
}
private void EndFrame(ScriptableRenderContext context, Camera[] cams)
{
UnityEditor.ShaderUtil.allowAsyncCompilation = m_PrevState;
}
#endif
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 818749deedaa79a4eb57d1ff065ec341
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0c0bbfbf065b6eb4691c4fe6a41bf42b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,59 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2768037713335557929
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blue Emisson
m_Shader: {fileID: -6465566751694194690, guid: b3573ee889ce32f4887b97753fd9e4f1, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- 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:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 0}
- _FocusColor: {r: 0, g: 0, b: 0, a: 1}
- _FocusEmisson: {r: 0, g: 0, b: 1, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a691c3990e00eea43a1745bce192ad90
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2768037713335557929
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blue
m_Shader: {fileID: -6465566751694194690, guid: b3573ee889ce32f4887b97753fd9e4f1, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- 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:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 0}
- _FocusColor: {r: 0, g: 0, b: 1, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bb915a2e04ca5be429e21bbb7010f826
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,886 @@
{
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "636407df8f18449facf36a0b02ead22d",
"m_Properties": [
{
"m_Id": "673003c90d4249a685b41ebbde517a01"
},
{
"m_Id": "5978de53cfa748788d88f94a029e0b40"
}
],
"m_Keywords": [],
"m_Dropdowns": [],
"m_CategoryData": [
{
"m_Id": "82975502fae848d3af91b65eef5bace3"
}
],
"m_Nodes": [
{
"m_Id": "4ac3008d76d84a8893dd3cb69cd3eefb"
},
{
"m_Id": "d421d514da5b4d0cad31089926a5e7b5"
},
{
"m_Id": "8b9d856a3e3042b88bc64ae3ab922e5d"
},
{
"m_Id": "84bdae6878214190b791fd806d08a5fa"
},
{
"m_Id": "b792079b70ed4381b9f29dbee961c867"
},
{
"m_Id": "82a90999fd1d4ab29fd353dd4c67e8d4"
},
{
"m_Id": "c4e3a7efb9fb40ddabbb572d029a84dd"
},
{
"m_Id": "25a176d8ee564fe69603a677f4068048"
},
{
"m_Id": "3a557f643fd34875a47cd1a59036e6cc"
},
{
"m_Id": "15624d6ee2714a6ea2367fd3d7dc3c9c"
},
{
"m_Id": "251720b9aecb4379a658ab1dbd52ab07"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "15624d6ee2714a6ea2367fd3d7dc3c9c"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "84bdae6878214190b791fd806d08a5fa"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "251720b9aecb4379a658ab1dbd52ab07"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "25a176d8ee564fe69603a677f4068048"
},
"m_SlotId": 0
}
}
],
"m_VertexContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": [
{
"m_Id": "4ac3008d76d84a8893dd3cb69cd3eefb"
},
{
"m_Id": "d421d514da5b4d0cad31089926a5e7b5"
},
{
"m_Id": "8b9d856a3e3042b88bc64ae3ab922e5d"
}
]
},
"m_FragmentContext": {
"m_Position": {
"x": 0.0,
"y": 200.0
},
"m_Blocks": [
{
"m_Id": "84bdae6878214190b791fd806d08a5fa"
},
{
"m_Id": "b792079b70ed4381b9f29dbee961c867"
},
{
"m_Id": "82a90999fd1d4ab29fd353dd4c67e8d4"
},
{
"m_Id": "c4e3a7efb9fb40ddabbb572d029a84dd"
},
{
"m_Id": "25a176d8ee564fe69603a677f4068048"
},
{
"m_Id": "3a557f643fd34875a47cd1a59036e6cc"
}
]
},
"m_PreviewData": {
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
},
"preventRotation": false
},
"m_Path": "Shader Graphs",
"m_GraphPrecision": 1,
"m_PreviewMode": 2,
"m_OutputNode": {
"m_Id": ""
},
"m_SubDatas": [],
"m_ActiveTargets": [
{
"m_Id": "a07f891fc7b943bfaedf18f7496a10f6"
}
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "15624d6ee2714a6ea2367fd3d7dc3c9c",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -219.00001525878907,
"y": 214.00001525878907,
"width": 137.00003051757813,
"height": 33.999969482421878
}
},
"m_Slots": [
{
"m_Id": "bbc1562b7bf54497a152ec6eddd1c090"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "673003c90d4249a685b41ebbde517a01"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot",
"m_ObjectId": "164f962d45f24d34954d0071ed8168ca",
"m_Id": 0,
"m_DisplayName": "Normal (Tangent Space)",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "NormalTS",
"m_StageCapability": 2,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [],
"m_Space": 3
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "251720b9aecb4379a658ab1dbd52ab07",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -225.0,
"y": 400.0,
"width": 152.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "8d477c52965c42d9b02526cd9fd161f5"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "5978de53cfa748788d88f94a029e0b40"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "25a176d8ee564fe69603a677f4068048",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.Emission",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "c197af62ab084c039141c2bd17d0a713"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.Emission"
}
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget",
"m_ObjectId": "31d7e4ca1d6e41eba1d77dc7f7763a83",
"m_WorkflowMode": 1,
"m_NormalDropOffSpace": 0,
"m_ClearCoat": false,
"m_BlendModePreserveSpecular": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "3a557f643fd34875a47cd1a59036e6cc",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.Occlusion",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "5a6d273d6c8f44ea9e681cec5853d6a5"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.Occlusion"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "4ac3008d76d84a8893dd3cb69cd3eefb",
"m_Group": {
"m_Id": ""
},
"m_Name": "VertexDescription.Position",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "8c9985d5a204452796fdb59e1f52bfa5"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "VertexDescription.Position"
}
{
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty",
"m_ObjectId": "5978de53cfa748788d88f94a029e0b40",
"m_Guid": {
"m_GuidSerialized": "9d5278b2-f1a6-49da-a7aa-dc905784fa8d"
},
"m_Name": "FocusEmisson",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "FocusEmisson",
"m_DefaultReferenceName": "_FocusEmisson",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": {
"r": 0.0,
"g": 0.0,
"b": 0.0,
"a": 0.0
},
"isMainColor": false,
"m_ColorMode": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "5a6d273d6c8f44ea9e681cec5853d6a5",
"m_Id": 0,
"m_DisplayName": "Ambient Occlusion",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Occlusion",
"m_StageCapability": 2,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}
{
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty",
"m_ObjectId": "673003c90d4249a685b41ebbde517a01",
"m_Guid": {
"m_GuidSerialized": "e517de6d-dae6-44f6-8bc9-1e457674751e"
},
"m_Name": "FocusColor",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "FocusColor",
"m_DefaultReferenceName": "_FocusColor",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": {
"r": 1.0,
"g": 1.0,
"b": 1.0,
"a": 0.0
},
"isMainColor": false,
"m_ColorMode": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "82975502fae848d3af91b65eef5bace3",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "673003c90d4249a685b41ebbde517a01"
},
{
"m_Id": "5978de53cfa748788d88f94a029e0b40"
}
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "82a90999fd1d4ab29fd353dd4c67e8d4",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.Metallic",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "8a598b0b85eb403aa78fa9040a4711dd"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.Metallic"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "84bdae6878214190b791fd806d08a5fa",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.BaseColor",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "d6e054d7be2541dba0998c62fbe8ecc9"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.BaseColor"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot",
"m_ObjectId": "8543996367d74f029bc12976a08e6162",
"m_Id": 0,
"m_DisplayName": "Tangent",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Tangent",
"m_StageCapability": 1,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [],
"m_Space": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "8a598b0b85eb403aa78fa9040a4711dd",
"m_Id": 0,
"m_DisplayName": "Metallic",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Metallic",
"m_StageCapability": 2,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "8b9d856a3e3042b88bc64ae3ab922e5d",
"m_Group": {
"m_Id": ""
},
"m_Name": "VertexDescription.Tangent",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "8543996367d74f029bc12976a08e6162"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "VertexDescription.Tangent"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot",
"m_ObjectId": "8c9985d5a204452796fdb59e1f52bfa5",
"m_Id": 0,
"m_DisplayName": "Position",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Position",
"m_StageCapability": 1,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [],
"m_Space": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
"m_ObjectId": "8d477c52965c42d9b02526cd9fd161f5",
"m_Id": 0,
"m_DisplayName": "FocusEmisson",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget",
"m_ObjectId": "a07f891fc7b943bfaedf18f7496a10f6",
"m_Datas": [],
"m_ActiveSubTarget": {
"m_Id": "31d7e4ca1d6e41eba1d77dc7f7763a83"
},
"m_AllowMaterialOverride": false,
"m_SurfaceType": 0,
"m_ZTestMode": 4,
"m_ZWriteControl": 0,
"m_AlphaMode": 0,
"m_RenderFace": 2,
"m_AlphaClip": false,
"m_CastShadows": true,
"m_ReceiveShadows": true,
"m_SupportsLODCrossFade": false,
"m_CustomEditorGUI": "",
"m_SupportVFX": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "b792079b70ed4381b9f29dbee961c867",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.NormalTS",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "164f962d45f24d34954d0071ed8168ca"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.NormalTS"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
"m_ObjectId": "bbc1562b7bf54497a152ec6eddd1c090",
"m_Id": 0,
"m_DisplayName": "FocusColor",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "be69bb46ef21445e96bf71efc0a6a31c",
"m_Id": 0,
"m_DisplayName": "Smoothness",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Smoothness",
"m_StageCapability": 2,
"m_Value": 0.5,
"m_DefaultValue": 0.5,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
"m_ObjectId": "c197af62ab084c039141c2bd17d0a713",
"m_Id": 0,
"m_DisplayName": "Emission",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Emission",
"m_StageCapability": 2,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [],
"m_ColorMode": 1,
"m_DefaultColor": {
"r": 0.0,
"g": 0.0,
"b": 0.0,
"a": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "c4e3a7efb9fb40ddabbb572d029a84dd",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.Smoothness",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "be69bb46ef21445e96bf71efc0a6a31c"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.Smoothness"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "d421d514da5b4d0cad31089926a5e7b5",
"m_Group": {
"m_Id": ""
},
"m_Name": "VertexDescription.Normal",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "eae4d53e0d5d498da4ac68bb922cf698"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "VertexDescription.Normal"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
"m_ObjectId": "d6e054d7be2541dba0998c62fbe8ecc9",
"m_Id": 0,
"m_DisplayName": "Base Color",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "BaseColor",
"m_StageCapability": 2,
"m_Value": {
"x": 0.5,
"y": 0.5,
"z": 0.5
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [],
"m_ColorMode": 0,
"m_DefaultColor": {
"r": 0.5,
"g": 0.5,
"b": 0.5,
"a": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot",
"m_ObjectId": "eae4d53e0d5d498da4ac68bb922cf698",
"m_Id": 0,
"m_DisplayName": "Normal",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Normal",
"m_StageCapability": 1,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [],
"m_Space": 0
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: b3573ee889ce32f4887b97753fd9e4f1
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

View File

@@ -0,0 +1,59 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2768037713335557929
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Green Emisson
m_Shader: {fileID: -6465566751694194690, guid: b3573ee889ce32f4887b97753fd9e4f1, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- 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:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 0}
- _FocusColor: {r: 0, g: 0, b: 0, a: 1}
- _FocusEmisson: {r: 0, g: 1, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bf2767b0c90db86448a8fca1a6f0704f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,58 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2768037713335557929
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Green
m_Shader: {fileID: -6465566751694194690, guid: b3573ee889ce32f4887b97753fd9e4f1, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- 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:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 0}
- _FocusColor: {r: 0, g: 1, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: acf0c85be2ad37d46b2fd371d564f42c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,59 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2768037713335557929
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Red Emisson
m_Shader: {fileID: -6465566751694194690, guid: b3573ee889ce32f4887b97753fd9e4f1, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- 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:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 0}
- _FocusColor: {r: 0, g: 0, b: 0, a: 1}
- _FocusEmisson: {r: 1, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a02165768c8b5d347a19582be55cf115
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,59 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2768037713335557929
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Red
m_Shader: {fileID: -6465566751694194690, guid: b3573ee889ce32f4887b97753fd9e4f1, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- 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:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 0}
- _FocusColor: {r: 1, g: 0, b: 0, a: 0}
- _FocusEmisson: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: be9460f93b77fad47bd4a0e0c668f060
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,59 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2768037713335557929
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: White Emission
m_Shader: {fileID: -6465566751694194690, guid: b3573ee889ce32f4887b97753fd9e4f1, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- 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:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 0}
- _FocusColor: {r: 0, g: 0, b: 0, a: 0}
- _FocusEmisson: {r: 1, g: 1, b: 1, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: aa4a555bdceb10c42aa1b0e38ff7c1ab
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,59 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2768037713335557929
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: White
m_Shader: {fileID: -6465566751694194690, guid: b3573ee889ce32f4887b97753fd9e4f1, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- 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:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 0}
- _FocusColor: {r: 1, g: 1, b: 1, a: 0}
- _FocusEmisson: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ea65911ef0eb50042ab644dbf63c031e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b868f842f9678814f94ac7c71f445276
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,95 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
namespace Convention
{
namespace VFX
{
#if UNITY_URP
public class FullscreenDissolve : FullscreenEffect
{
[Setting, SerializeField] private List<string> IgnoreCameraTag = new();
[Setting, SerializeField, Tooltip("PassMaterial.TransitionAmount")]
private string TransitionAmount_Float = "_TransitionAmount";
[Content, Setting] private bool DissolveNeeded = false;
[Setting, Header("Dissolve Setting")] public AnimationCurve DissolveZoomInCurve = AnimationCurve.Linear(0, 0, 1, 1);
[Setting] public AnimationCurve DissolveZoomOutCurve = AnimationCurve.Linear(0, 0, 1, 1);
[Setting] public float ZommInDuration = 0.5f;
[Setting] public float ZommOutDuration = 0.5f;
[Setting] public float StayDuration = 0.5f;
public override void SetEffectWeight([Percentage(0, 1)] float value)
{
this.PassMaterial.SetFloat(TransitionAmount_Float, value);
}
private IEnumerator Dissolving(Action midCallback, Action endCallback)
{
DissolveNeeded = true;
float ticks = ZommInDuration;
while (ticks > 0)
{
SetEffectWeight(DissolveZoomInCurve.Evaluate(1.0f - ticks / ZommInDuration));
ticks -= Time.deltaTime;
yield return null;
}
SetEffectWeight(1);
midCallback();
ticks = StayDuration;
while (ticks > 0)
{
ticks -= Time.deltaTime;
yield return null;
}
while (ticks < ZommOutDuration)
{
SetEffectWeight(DissolveZoomOutCurve.Evaluate(1.0f - ticks / ZommOutDuration));
ticks += Time.deltaTime;
yield return null;
}
SetEffectWeight(0);
endCallback();
DissolveNeeded = false;
}
[Content,OnlyPlayMode]
public void StartDissolve()
{
StopCoroutine("Dissolving");
StartCoroutine(Dissolving(() => { }, () => { }));
}
public void StartDissolve(Action callback, bool isMid)
{
StopCoroutine("Dissolving");
if (isMid)
StartCoroutine(Dissolving(callback, () => { }));
else
StartCoroutine(Dissolving(() => { }, callback));
}
public void StartDissolve(Action midCallback, Action endCallback)
{
StopCoroutine("Dissolving");
StartCoroutine(Dissolving(midCallback, endCallback));
}
public override void OnBeginCamera(ScriptableRenderContext ctx, Camera cam)
{
foreach (var tag in IgnoreCameraTag)
{
if (cam.CompareTag(tag))
return;
}
if (!DissolveNeeded)
{
return;
}
base.OnBeginCamera(ctx, cam);
}
}
#endif
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a5a3db8f679e3ee40b424f8a997797ed
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 93afaed801d082a47ac8a7eafd14328f
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b38eca3ff78647546a350a3c41d16be7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,48 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Template
m_Shader: {fileID: -6465566751694194690, guid: 93afaed801d082a47ac8a7eafd14328f, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _NoiseTex:
m_Texture: {fileID: 2800000, guid: a8ec41410392c4940b63ebe455039d18, 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:
- _GridScale: 4.9
- _TransitionAmount: 0
m_Colors:
- _TransitionColor: {r: 44.72705, g: 43.99656, b: 24.684265, a: 1}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 852e8e3e607856b4b8ca035fe91f3377
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: a8ec41410392c4940b63ebe455039d18
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 86d6ec0e207041f47bfbced080bb0af7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,120 @@
using System;
using System.Linq;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Rendering;
#if UNITY_URP
using UnityEngine.Rendering.Universal;
namespace Convention
{
namespace VFX
{
// Empty class to be used in scenes and doesn't implement any additional overrides
public abstract class FullscreenEffect : FullscreenEffectBase<FullscreenPassBase>
{
public abstract void SetEffectWeight([Percentage(0f, 1f)] float value);
}
[ExecuteAlways]
public class FullscreenEffectBase<T> : MonoAnyBehaviour where T : FullscreenPassBase, new()
{
[Ignore] private T _pass;
[Ignore] public Material PassMaterial { get => _pass.material; }
[SerializeField, Setting]
private string _passName = "Fullscreen Pass";
[SerializeField, Setting]
private Material _material;
[SerializeField, Setting]
private RenderPassEvent _injectionPoint = RenderPassEvent.BeforeRenderingTransparents;
[SerializeField, Setting]
private int _injectionPointOffset = 0;
[SerializeField, Setting]
private ScriptableRenderPassInput _inputRequirements = ScriptableRenderPassInput.None;
[SerializeField, Setting]
private CameraType _cameraType = CameraType.Game | CameraType.SceneView;
private void OnEnable()
{
SetupPass();
RenderPipelineManager.beginCameraRendering += OnBeginCamera;
}
private void OnDisable()
{
RenderPipelineManager.beginCameraRendering -= OnBeginCamera;
}
public virtual void SetupPass()
{
_pass ??= new T();
// pass setup
_pass.renderPassEvent = _injectionPoint + _injectionPointOffset;
_pass.material = _material;
if (_material != null)
{
_pass.hasYFlipKeyword = _material.shader.keywordSpace.keywordNames.Contains("_FLIPY");
if (_pass.hasYFlipKeyword)
_pass.yFlipKeyword = new LocalKeyword(_material.shader, "_FLIPY");
}
_pass.passName = _passName;
_pass.ConfigureInput(_inputRequirements);
}
public virtual void OnBeginCamera(ScriptableRenderContext ctx, Camera cam)
{
// Skip if pass wasn't initialized or if material is empty
if (_pass == null || _material == null)
return;
// Only draw for selected camera types
if ((cam.cameraType & _cameraType) == 0) return;
// injection pass
cam.GetUniversalAdditionalCameraData().scriptableRenderer.EnqueuePass(_pass);
}
private void OnValidate()
{
SetupPass();
}
}
public class FullscreenPassBase : ScriptableRenderPass
{
public Material material;
public bool hasYFlipKeyword;
public LocalKeyword yFlipKeyword;
public string passName = "Fullscreen Pass";
public UnityAction<Material> additionalExecuteAction;
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
{
if (hasYFlipKeyword)
material.SetKeyword(
yFlipKeyword,
renderingData.cameraData.IsRenderTargetProjectionMatrixFlipped(renderingData.cameraData.renderer.cameraColorTargetHandle)
);
var cmd = CommandBufferPool.Get(passName);
CoreUtils.DrawFullScreen(cmd, material);
context.ExecuteCommandBuffer(cmd);
cmd.Clear();
}
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d55f6bacc8fa240449cea224cfbf108f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cbf77eb153e7ab947815ab0a75dfb41c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e0af6a6fab276f34a8dc30144ae29cc5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,269 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Grid2D
m_Shader: {fileID: 4800000, guid: ff981f62dedb909468a8392222d7185d, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _DISABLE_SSR_TRANSPARENT
- _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- RayTracingPrepass
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
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}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
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:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AddPrecomputedVelocity: 0
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _AlphaCutoffShadow: 0.5
- _AlphaDstBlend: 0
- _AlphaSrcBlend: 1
- _AlphaToMask: 0
- _AlphaToMaskInspectorValue: 0
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _CullMode: 2
- _CullModeForward: 2
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DiffusionProfileHash: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DoubleSidedEnable: 0
- _DoubleSidedGIMode: 0
- _DoubleSidedNormalMode: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveExposureWeight: 1
- _EmissiveIntensity: 1
- _EmissiveIntensityUnit: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InvTilingScale: 1
- _Ior: 1.5
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0
- _MetallicRemapMax: 0
- _MetallicRemapMin: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _OpaqueCullMode: 2
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _RayTracing: 0
- _ReceivesSSR: 1
- _ReceivesSSRTransparent: 0
- _RefractionModel: 0
- _Smoothness: 0.5
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SpecularOcclusionMode: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRefDepth: 8
- _StencilRefGBuffer: 10
- _StencilRefMV: 40
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 8
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 40
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentCullMode: 2
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _TransparentWritingMotionVec: 0
- _TransparentZWrite: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _UseEmissiveIntensity: 0
- _UseShadowThreshold: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestTransparent: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
--- !u!114 &3433140733309414451
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:
version: 12
hdPluginSubTargetMaterialVersions:
m_Keys: []
m_Values:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 72af8b2c92366de458c02baa13990a1a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,58 @@
Shader "AD/uvTutorial"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags{
"RenderPipeline"="UniversalRenderPipeline"
"RenderType"="Transparent"
"IgnoreProjector"="True"
"Queue"="Transparent"
}
Pass
{
Blend SrcAlpha OneMinusSrcAlpha
ZWrite off
Cull off
HLSLPROGRAM
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#pragma vertex vert
#pragma fragment frag
struct Attributes{
float4 positionOS : POSITION;
float2 uv : TEXCOORD0;
};
struct Varings{
float4 positionCS : SV_POSITION;
float2 uv : TEXCOORD0;
};
float _fragSize;
float _frageCenter;
Varings vert(Attributes input){
Varings o;
o.positionCS = TransformObjectToHClip(input.positionOS);
o.uv = input.uv;
return o;
}
half4 frag(Varings input) : SV_TARGET{
float2 uv = input.uv * 10;
float2 derivative = fwidth(uv);
uv = frac(uv);
uv = abs(uv - 0.5);
uv = uv / derivative; //<2F><><EFBFBD>ʼ<EFBFAA><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD><64><D4BD><EFBFBD><EFBFBD>uvԽС<D4BD><D0A1><EFBFBD><EFBFBD><EFBFBD>п<EFBFBD><D0BF><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD>alphaֵ<61><D6B5>
float min_value = min(uv.x, uv.y);
half alpha = 1.0 - min(min_value, 1.0); //ʵ<>ʵ<EFBFBD><CAB5>߿<EFBFBD><DFBF>ǿ<EFBFBD><C7BF><EFBFBD>x,y<><79><EFBFBD>ģ<EFBFBD>
//Զ<><D4B6>x, y<><79><EFBFBD><EFBFBD>uvֵ<76><D6B5><EFBFBD><EFBFBD>min<69><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0
return half4(1.0, 0.0, 0.0, alpha);
}
ENDHLSL
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ff981f62dedb909468a8392222d7185d
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f1851fb717af00c4da3d50635cbb0293
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,270 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2090386079456462257
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:
version: 12
hdPluginSubTargetMaterialVersions:
m_Keys: []
m_Values:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Grid2DFull DoublePanel-XZ
m_Shader: {fileID: 4800000, guid: 37e7e81471ec9d14198517da0d17fd45, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _DISABLE_SSR_TRANSPARENT
- _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- RayTracingPrepass
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
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}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
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:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AddPrecomputedVelocity: 0
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _AlphaCutoffShadow: 0.5
- _AlphaDstBlend: 0
- _AlphaSrcBlend: 1
- _AlphaToMask: 0
- _AlphaToMaskInspectorValue: 0
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _CullMode: 2
- _CullModeForward: 2
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DiffusionProfileHash: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DoubleSidedEnable: 0
- _DoubleSidedGIMode: 0
- _DoubleSidedNormalMode: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveExposureWeight: 1
- _EmissiveIntensity: 1
- _EmissiveIntensityUnit: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InvTilingScale: 1
- _Ior: 1.5
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0
- _MetallicRemapMax: 0
- _MetallicRemapMin: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _OpaqueCullMode: 2
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _PlaneLevel: -0.05
- _RayTracing: 0
- _ReceivesSSR: 1
- _ReceivesSSRTransparent: 0
- _RefractionModel: 0
- _Smoothness: 0.5
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SpecularOcclusionMode: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRefDepth: 8
- _StencilRefGBuffer: 10
- _StencilRefMV: 40
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 8
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 40
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentCullMode: 2
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _TransparentWritingMotionVec: 0
- _TransparentZWrite: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _UseEmissiveIntensity: 0
- _UseShadowThreshold: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestTransparent: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4b83f491038a41a4a9a0d1aff43a69a4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,108 @@
Shader "GridFull/infTutorialDouble"
{
Properties
{
//_PlaneLevel("High",float) = 0
}
SubShader
{
Tags{
"RenderPipeline"="UniversalRenderPipeline"
"RenderType"="Transparent"
"IgnoreProjector"="True"
"Queue"="Transparent"
}
Pass
{
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off
Cull off
HLSLPROGRAM
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#pragma vertex vert
#pragma fragment frag
//float _PlaneLevel;
struct Attributes
{
float4 positionOS : POSITION;
float2 uv : TEXCOORD0;
};
struct Varings
{
float4 positionCS : SV_POSITION;
float3 nearPoint : TEXCOORD0;
float3 farPoint : TEXCOORD1;
};
float3 TransformHClipToWorld(float3 positionCS, float4x4 inv_VP)
{
float4 unprojectedPoint = mul(inv_VP, float4(positionCS, 1.0));
return unprojectedPoint.xyz / unprojectedPoint.w;
}
Varings vert(Attributes input)
{
//此shader专用于quad mesh
//所以使用4个顶点的uv值进行变换 作为 裁切空间的坐标
//保证这是一个覆盖全屏幕的渲染
Varings o;
float2 uv = input.uv * 2.0 - 1.0;
//默认情况下Zndc = 1是远平面
half farPlane = 1;
half nearPlane = 0;
#if defined(UNITY_REVERSED_Z)
//有时候会反转z
farPlane = 1 - farPlane;
nearPlane = 1 - nearPlane;
#endif
float4 position = float4(uv, farPlane, 1);
float3 nearPoint = TransformHClipToWorld(float3(position.xy, nearPlane), UNITY_MATRIX_I_VP);
float3 farPoint = TransformHClipToWorld(float3(position.xy, farPlane), UNITY_MATRIX_I_VP);
o.positionCS = position;
o.nearPoint = nearPoint;
o.farPoint = farPoint;
return o;
}
float computeViewZ(float3 pos) {
float4 clip_space_pos = mul(UNITY_MATRIX_VP, float4(pos.xyz, 1.0));
float viewZ = clip_space_pos.w; //根据projection矩阵定义positionCS.w = viewZ
return viewZ;
}
half Grid(float2 uv){
float2 derivative = fwidth(uv);
uv = frac(uv - 0.5); //中心对齐
uv = abs(uv - 0.5);
uv = uv / derivative;
float min_value = min(uv.x, uv.y);
half grid = 1.0 - min(min_value, 1.0);
return grid;
}
half4 frag(Varings input) : SV_TARGET{
//计算地平面
float t = -input.nearPoint.y / (input.farPoint.y - input.nearPoint.y);
//float3 positionWS = input.nearPoint + t * (input.farPoint - input.nearPoint);
//half ground = step(_PlaneLevel, t);
float3 positionWS = input.nearPoint + t * (input.farPoint - input.nearPoint);
half ground = step(-0.05, t);
float3 cameraPos = _WorldSpaceCameraPos;
float fromOrigin = abs(cameraPos.y);
float viewZ = computeViewZ(positionWS);
float2 uv = positionWS.xz;
//计算grid
float fading = max(0.0, 1.0 - viewZ / 150);
half smallGrid = Grid(uv) * lerp(1, 0, min(1.0, fromOrigin / 100));
half middleGrid = Grid(uv * 0.1) * lerp(1, 0, min(1.0, fromOrigin / 300));
half largeGrid = Grid(uv * 0.01) * lerp(1, 0, min(1.0, fromOrigin / 800));
//合并计算
half grid = smallGrid + middleGrid + largeGrid;
return half4(0.5, 0.5, 0.5 ,ground * grid * fading * 0.5); //顺便改色减淡一下
}
ENDHLSL
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 37e7e81471ec9d14198517da0d17fd45
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,99 @@
Shader "GridFull/2DFull"
{
Properties
{
_ColorLevel("Color Level",Range(0,1)) =1
}
SubShader
{
Tags{
"RenderPipeline"="UniversalRenderPipeline"
"RenderType"="Transparent"
"IgnoreProjector"="True"
"Queue"="Transparent"
"PreviewType"="Plane"
}
Pass
{
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off
Cull off
HLSLPROGRAM
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#pragma vertex vert
#pragma fragment frag
half _ColorLevel;
struct Attributes
{
float4 positionOS : POSITION;
float2 uv : TEXCOORD0;
};
struct Varings
{
float4 positionCS : SV_POSITION;
float3 nearPoint : TEXCOORD0;
float3 farPoint : TEXCOORD1;
};
float3 TransformHClipToWorld(float3 positionCS, float4x4 inv_VP)
{
float4 unprojectedPoint = mul(inv_VP, float4(positionCS, 1.0));
return unprojectedPoint.xyz / unprojectedPoint.w;
}
Varings vert(Attributes input)
{
Varings o;
float2 uv = input.uv * 2.0 - 1.0;
half farPlane = 1;
half nearPlane = 0;
#if defined(UNITY_REVERSED_Z)
farPlane = 1 - farPlane;
nearPlane = 1 - nearPlane;
#endif
float4 position = float4(uv, farPlane, 1);
float3 nearPoint = TransformHClipToWorld(float3(position.xy, nearPlane), UNITY_MATRIX_I_VP);
float3 farPoint = TransformHClipToWorld(float3(position.xy, farPlane), UNITY_MATRIX_I_VP);
o.positionCS = position;
o.nearPoint = nearPoint;
o.farPoint = farPoint;
return o;
}
float computeViewZ(float3 pos) {
float4 clip_space_pos = mul(UNITY_MATRIX_VP, float4(pos.xyz, 1.0));
float viewZ = clip_space_pos.w;
return viewZ;
}
half Grid(float2 uv){
float2 derivative = fwidth(uv);
uv = frac(uv - 0.5);
uv = abs(uv - 0.5);
uv = uv / derivative;
float min_value = min(uv.x, uv.y);
half grid = 1.0 - min(min_value, 1.0);
return grid;
}
half4 frag(Varings input) : SV_TARGET{
float t = -input.nearPoint.z / (input.farPoint.z - input.nearPoint.z);
float3 positionWS = input.nearPoint + t * (input.farPoint - input.nearPoint);
half ground = step(0, t);
float3 cameraPos = _WorldSpaceCameraPos;
float fromOrigin = abs(cameraPos.z);
float viewZ = computeViewZ(positionWS);
float2 uv = positionWS.xy;
float fading = max(0.0, 1.0 - viewZ / 150);
half smallGrid = Grid(uv) * lerp(1, 0, min(1.0, fromOrigin / 100));
half middleGrid = Grid(uv * 0.1) * lerp(1, 0, min(1.0, fromOrigin / 300));
half largeGrid = Grid(uv * 0.01) * lerp(1, 0, min(1.0, fromOrigin / 800));
half grid = smallGrid + middleGrid + largeGrid;
return half4(0.5, 0.5, 0.5 ,ground * grid * fading * 0.5 * _ColorLevel);
}
ENDHLSL
}
}
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c172eb9b2d40f564a955c20e1b05f365
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,271 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Grid2DFull-XZ
m_Shader: {fileID: 4800000, guid: 080d6d6029e2c884bb79b02882433133, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _DISABLE_SSR_TRANSPARENT
- _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- RayTracingPrepass
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _CoatMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
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}
- _MaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
m_Texture: {fileID: 0}
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:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AddPrecomputedVelocity: 0
- _AlbedoAffectEmissive: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _AlphaCutoffShadow: 0.5
- _AlphaDstBlend: 0
- _AlphaSrcBlend: 1
- _AlphaToMask: 0
- _AlphaToMaskInspectorValue: 0
- _Anisotropy: 0
- _BlendMode: 0
- _CoatMask: 0
- _ColorLevel: 1
- _CullMode: 2
- _CullModeForward: 2
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DiffusionProfileHash: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DoubleSidedEnable: 0
- _DoubleSidedGIMode: 0
- _DoubleSidedNormalMode: 1
- _DstBlend: 0
- _EmissiveColorMode: 1
- _EmissiveExposureWeight: 1
- _EmissiveIntensity: 1
- _EmissiveIntensityUnit: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InvTilingScale: 1
- _Ior: 1.5
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0
- _MetallicRemapMax: 0
- _MetallicRemapMin: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _OpaqueCullMode: 2
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _PlaneLevel: -0.05
- _RayTracing: 0
- _ReceivesSSR: 1
- _ReceivesSSRTransparent: 0
- _RefractionModel: 0
- _Smoothness: 0.5
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SpecularOcclusionMode: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRefDepth: 8
- _StencilRefGBuffer: 10
- _StencilRefMV: 40
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 8
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 40
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _SurfaceType: 0
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentCullMode: 2
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _TransparentWritingMotionVec: 0
- _TransparentZWrite: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _UseEmissiveIntensity: 0
- _UseShadowThreshold: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestTransparent: 4
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
--- !u!114 &5027933924106573666
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:
version: 12
hdPluginSubTargetMaterialVersions:
m_Keys: []
m_Values:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8e0f5baad6aeed745b241ed0b15f1ae7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,108 @@
Shader "GridFull/infTutorial"
{
Properties
{
_ColorLevel("Color Level",Range(0,1)) =1
}
SubShader
{
Tags{
"RenderPipeline"="UniversalRenderPipeline"
"RenderType"="Transparent"
"IgnoreProjector"="True"
"Queue"="Transparent"
}
Pass
{
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off
Cull off
HLSLPROGRAM
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#pragma vertex vert
#pragma fragment frag
half _ColorLevel;
struct Attributes
{
float4 positionOS : POSITION;
float2 uv : TEXCOORD0;
};
struct Varings
{
float4 positionCS : SV_POSITION;
float3 nearPoint : TEXCOORD0;
float3 farPoint : TEXCOORD1;
};
float3 TransformHClipToWorld(float3 positionCS, float4x4 inv_VP)
{
float4 unprojectedPoint = mul(inv_VP, float4(positionCS, 1.0));
return unprojectedPoint.xyz / unprojectedPoint.w;
}
Varings vert(Attributes input)
{
//此shader专用于quad mesh
//所以使用4个顶点的uv值进行变换 作为 裁切空间的坐标
//保证这是一个覆盖全屏幕的渲染
Varings o;
float2 uv = input.uv * 2.0 - 1.0;
//默认情况下Zndc = 1是远平面
half farPlane = 1;
half nearPlane = 0;
#if defined(UNITY_REVERSED_Z)
//有时候会反转z
farPlane = 1 - farPlane;
nearPlane = 1 - nearPlane;
#endif
float4 position = float4(uv, farPlane, 1);
float3 nearPoint = TransformHClipToWorld(float3(position.xy, nearPlane), UNITY_MATRIX_I_VP);
float3 farPoint = TransformHClipToWorld(float3(position.xy, farPlane), UNITY_MATRIX_I_VP);
o.positionCS = position;
o.nearPoint = nearPoint;
o.farPoint = farPoint;
return o;
}
float computeViewZ(float3 pos) {
float4 clip_space_pos = mul(UNITY_MATRIX_VP, float4(pos.xyz, 1.0));
float viewZ = clip_space_pos.w; //根据projection矩阵定义positionCS.w = viewZ
return viewZ;
}
half Grid(float2 uv){
float2 derivative = fwidth(uv);
uv = frac(uv - 0.5); //中心对齐
uv = abs(uv - 0.5);
uv = uv / derivative;
float min_value = min(uv.x, uv.y);
half grid = 1.0 - min(min_value, 1.0);
return grid;
}
half4 frag(Varings input) : SV_TARGET{
//计算地平面
float t = -input.nearPoint.y / (input.farPoint.y - input.nearPoint.y);
//float3 positionWS = input.nearPoint + t * (input.farPoint - input.nearPoint);
//half ground = step(_PlaneLevel, t);
float3 positionWS = input.nearPoint + t * (input.farPoint - input.nearPoint);
half ground = step(0, t);
float3 cameraPos = _WorldSpaceCameraPos;
float fromOrigin = abs(cameraPos.y);
float viewZ = computeViewZ(positionWS);
float2 uv = positionWS.xz;
//计算grid
float fading = max(0.0, 1.0 - viewZ / 150);
half smallGrid = Grid(uv) * lerp(1, 0, min(1.0, fromOrigin / 100));
half middleGrid = Grid(uv * 0.1) * lerp(1, 0, min(1.0, fromOrigin / 300));
half largeGrid = Grid(uv * 0.01) * lerp(1, 0, min(1.0, fromOrigin / 800));
//合并计算
half grid = smallGrid + middleGrid + largeGrid;
return half4(0.5, 0.5, 0.5 ,ground * grid * fading * 0.5 * _ColorLevel); //顺便改色减淡一下
}
ENDHLSL
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 080d6d6029e2c884bb79b02882433133
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,32 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GridSpriteFull-XY
m_Shader: {fileID: 4800000, guid: 099ea33a7b313e343aec7a115569eb79, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2750
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _ColorLevel: 1
- _GridScale: 1
m_Colors:
- _Offset: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9620d68e03db6c845ab23c22bac32d9a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,108 @@
Shader "GridFull/infTutorial"
{
Properties
{
_ColorLevel("Color Level",Range(0,1)) = 1
_Offset("Position Offset", Vector) = (0,0,0,0)
}
SubShader
{
Tags{
"RenderPipeline"="UniversalRenderPipeline"
"RenderType"="Transparent"
"IgnoreProjector"="True"
"Queue"="Transparent"
}
Pass
{
Blend SrcAlpha OneMinusSrcAlpha
ZWrite Off
Cull off
HLSLPROGRAM
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#pragma vertex vert
#pragma fragment frag
half _ColorLevel;
float2 _Offset;
struct Attributes
{
float4 positionOS : POSITION;
float2 uv : TEXCOORD0;
};
struct Varings
{
float4 positionCS : SV_POSITION;
float3 nearPoint : TEXCOORD0;
float3 farPoint : TEXCOORD1;
};
float3 TransformHClipToWorld(float3 positionCS, float4x4 inv_VP)
{
float4 unprojectedPoint = mul(inv_VP, float4(positionCS, 1.0));
return unprojectedPoint.xyz / unprojectedPoint.w;
}
Varings vert(Attributes input)
{
//此shader专用于quad mesh
//所以使用4个顶点的uv值进行变换 作为 裁切空间的坐标
//保证这是一个覆盖全屏幕的渲染
Varings o;
float2 uv = input.uv * 2.0 - 1.0;
//默认情况下Zndc = 1是远平面
half farPlane = 1;
half nearPlane = 0;
#if defined(UNITY_REVERSED_Z)
//有时候会反转z
farPlane = 1 - farPlane;
nearPlane = 1 - nearPlane;
#endif
float4 position = float4(uv, farPlane, 1);
float3 nearPoint = TransformHClipToWorld(float3(position.xy, nearPlane), UNITY_MATRIX_I_VP);
float3 farPoint = TransformHClipToWorld(float3(position.xy, farPlane), UNITY_MATRIX_I_VP);
o.positionCS = position;
o.nearPoint = nearPoint;
o.farPoint = farPoint;
return o;
}
float computeViewZ(float3 pos) {
float4 clip_space_pos = mul(UNITY_MATRIX_VP, float4(pos.xyz, 1.0));
float viewZ = clip_space_pos.w; //根据projection矩阵定义positionCS.w = viewZ
return viewZ;
}
half Grid(float2 uv){
float2 derivative = fwidth(uv);
uv = frac(uv - 0.5); //中心对齐
uv = abs(uv - 0.5);
uv = uv / derivative;
float min_value = min(uv.x, uv.y);
half grid = 1.0 - min(min_value, 1.0);
return grid;
}
half4 frag(Varings input) : SV_TARGET{
//计算地平面
float t = -input.nearPoint.z / (input.farPoint.z - input.nearPoint.z);
float3 positionWS = input.nearPoint + t * (input.farPoint - input.nearPoint);
half ground = step(0, t);
float3 cameraPos = _WorldSpaceCameraPos;
float fromOrigin = abs(cameraPos.z);
float viewZ = computeViewZ(positionWS);
float2 uv = positionWS.xy - _Offset;//mul(unity_ObjectToWorld , float4(0,0,0,1)).xy;
//计算grid
float fading = max(0.0, 1.0 - viewZ / 150);
half smallGrid = Grid(uv) * lerp(1, 0, min(1.0, fromOrigin / 100));
half middleGrid = Grid(uv * 0.1) * lerp(1, 0, min(1.0, fromOrigin / 300));
half largeGrid = Grid(uv * 0.01) * lerp(1, 0, min(1.0, fromOrigin / 800));
//合并计算
half grid = smallGrid + middleGrid + largeGrid;
return half4(0.5, 0.5, 0.5 ,ground * grid * fading * 0.5 * _ColorLevel); //顺便改色减淡一下
}
ENDHLSL
}
}
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 099ea33a7b313e343aec7a115569eb79
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,17 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Convention.VFX
{
public class GridSpriteFullSetter : MonoBehaviour
{
[Resources]public Transform target;
[Resources]public MeshRenderer MyMeshRenderer;
void Update()
{
MyMeshRenderer.material.SetVector("_Offset", target.position);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4b57e9e00549108469fb592a16980c2b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 342fda43ad82dab48a445664678b3962
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,196 @@
#if DREAMTECK_SPLINES
using System.Collections.Generic;
using Convention.WindowsUI.Variant;
using Dreamteck.Splines;
using UnityEngine;
namespace Convention.VFX
{
public class DreamTeckSplinePointBuilder : MonoAnyBehaviour, ILoadedInHierarchy
{
public enum InjectType
{
None = -1,
SmoothMirrored = SplinePoint.Type.SmoothMirrored,
Broken = SplinePoint.Type.Broken,
SmoothFree = SplinePoint.Type.SmoothFree
};
[Setting, InspectorDraw] public PerformanceIndicator.PerformanceMode performanceMode = PerformanceIndicator.PerformanceMode.Speed;
[Content] public List<LinePoint> childPoints = new();
[Resources, SerializeField, HopeNotNull, InspectorDraw] private SplineComputer m_splineComputer;
[Setting, InspectorDraw] public InjectType PointType = InjectType.None;
[Resources, SerializeField, HopeNotNull, InspectorDraw] private SplineRenderer m_splineRenderer;
public SplineComputer MainSpline => m_splineComputer;
[Content] public List<SplinePoint> knots = new();
[InspectorDraw]
public Vector2 Range
{
get => new((float)m_splineRenderer.clipFrom, (float)m_splineRenderer.clipTo);
set
{
m_splineRenderer.SetClipRange(value.x, value.y);
}
}
[Percentage(0, 1), InspectorDraw]
public float Head
{
get => (float)m_splineRenderer.clipFrom;
set => m_splineRenderer.clipFrom = value;
}
[Percentage(0, 1), InspectorDraw]
public float Tail
{
get => (float)m_splineRenderer.clipTo;
set => m_splineRenderer.clipTo = value;
}
[Percentage(0, 1), InspectorDraw]
public float Duration
{
get => (float)(m_splineRenderer.clipTo - m_splineRenderer.clipFrom);
set => m_splineRenderer.clipTo = m_splineRenderer.clipFrom + value;
}
public float Distance
{
get => m_splineRenderer.CalculateLength(Head, Tail);
set
{
var t = value / m_splineRenderer.CalculateLength(Head, Tail);
Duration = t;
}
}
public float GetDistanceBetweenHeadAndBegin()
{
return m_splineRenderer.CalculateLength(0, Head);
}
public float GetDistanceBetweenHeadAndTail()
{
return m_splineRenderer.CalculateLength(Head, Tail);
}
public float GetDistanceBetweenTailAndBegin()
{
return m_splineRenderer.CalculateLength(0, Tail);
}
public float GetDistanceBetweenEndAndTail()
{
return m_splineRenderer.CalculateLength(Tail, 1);
}
public float GetDistanceBetweenEndAndHead()
{
return m_splineRenderer.CalculateLength(Head,1);
}
public float GetTotalDistance()
{
return m_splineRenderer.CalculateLength(0, 1);
}
private void Reset()
{
m_splineComputer = GetComponent<SplineComputer>();
m_splineRenderer = GetComponent<SplineRenderer>();
}
void Start()
{
if (m_splineComputer == null)
m_splineComputer = GetComponent<SplineComputer>();
if (m_splineRenderer == null)
m_splineRenderer = GetComponent<SplineRenderer>();
}
private void LateUpdate()
{
if ((int)performanceMode >= (int)PerformanceIndicator.PerformanceMode.L6)
{
RebuildAll();
m_splineRenderer.Rebuild();
}
else if ((int)performanceMode >= (int)PerformanceIndicator.PerformanceMode.L6)
{
if (childPoints.Count != knots.Count)
RebuildAll();
else
ResetPoints();
m_splineRenderer.Rebuild();
}
}
public static void SetKnot([In, ArgPackage] ref SplinePoint point, [In, ArgPackage] LinePoint linePoint)
{
point.position = linePoint.transform.localPosition;
point.normal = linePoint.Forward;
point.size = linePoint.Scale;
point.color = linePoint.PointColor;
}
[Content]
public void RebuildAll()
{
if (knots.Count != childPoints.Count)
{
for (int i = knots.Count, e = childPoints.Count; i != e; i++)
knots.Add(new());
}
if (knots.Count != childPoints.Count)
{
knots.RemoveRange(childPoints.Count, knots.Count - childPoints.Count);
}
MainSpline.SetPoints(knots.ToArray());
// 更新所有点的位置和类型
for (int i = 0; i < childPoints.Count; i++)
{
var point = knots[i];
SetKnot(ref point, childPoints[i]);
if (PointType != InjectType.None)
point.type = (SplinePoint.Type)PointType;
MainSpline.SetPoint(i, knots[i] = point, SplineComputer.Space.Local);
}
}
[Content]
public void ResetPoints()
{
if (knots.Count == 0)
return;
for (int i = 0; i < childPoints.Count; i++)
{
var point = knots[i];
SetKnot(ref point, childPoints[i]);
if (PointType != InjectType.None)
point.type = (SplinePoint.Type)PointType;
MainSpline.SetPoint(i, knots[i] = point);
}
for (int i = childPoints.Count, e = knots.Count; i < e; i++)
{
var point = knots[i];
SetKnot(ref point, childPoints[i]);
if (PointType != InjectType.None)
point.type = (SplinePoint.Type)PointType;
MainSpline.SetPoint(i, knots[i] = point);
}
}
[Content]
[return: ReturnNotNull]
public LinePoint AddChild()
{
var trans = new GameObject("Point").AddComponent<LinePoint>();
if (childPoints.Count > 0)
{
trans.transform.SetParent(childPoints[^1].transform.parent);
trans.transform.position = childPoints[^1].transform.position;
}
childPoints.Add(trans);
if (HierarchyWindow.instance && HierarchyWindow.instance.ContainsReference(this))
{
var item = HierarchyWindow.instance.GetReferenceItem(this)
.CreateSubPropertyItemWithBinders(trans.gameObject)[0];
item.ref_value.GetComponent<HierarchyItem>().title = trans.gameObject.name;
}
RebuildAll();
return trans;
}
}
}
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9dcad3baf738c3d479d5507841c3c218
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using UnityEngine;
namespace Convention.VFX
{
public class LinePoint : MonoBehaviour, ILoadedInHierarchy
{
public float Scale { get; private set; }
public float ScaleOne = new Vector3(1, 1, 1).magnitude;
public Vector3 Forward { get; private set; }
public Color PointColor = Color.white;
public float PointWeight = 1;
private void Update()
{
Scale = transform.localScale.magnitude / ScaleOne;
Forward = transform.forward;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 634e0418c9478104ca8cf43ef250841d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Convention.VFX
{
[RequireComponent(typeof(LineRenderer))]
public class LinePointContainer : MonoBehaviour
{
[Resources, HopeNotNull, SerializeField] private LineRenderer lineRenderer;
private void Reset()
{
lineRenderer = GetComponent<LineRenderer>();
}
private void Start()
{
if (lineRenderer == null)
lineRenderer = GetComponent<LineRenderer>();
}
public void Rebuild()
{
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d9caa8670fe1a0046b08e71bd7509e05
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,137 @@
#if UNITY_SPLINE
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Convention.WindowsUI.Variant;
using UnityEngine;
using UnityEngine.Splines;
namespace Convention.VFX
{
public class SplinePointBuilder : MonoAnyBehaviour, ILoadedInHierarchy
{
[Setting, InspectorDraw] public PerformanceIndicator.PerformanceMode performanceMode = PerformanceIndicator.PerformanceMode.Speed;
[Content] public List<LinePoint> childPoints = new();
[Resources, SerializeField, HopeNotNull, InspectorDraw] private SplineContainer m_splineContainer;
public Spline MainSpline => m_splineContainer.Spline;
[Resources, SerializeField, HopeNotNull, InspectorDraw] private SplineExtrude m_splineExtrude;
[Content] public List<BezierKnot> knots = new List<BezierKnot>();
[InspectorDraw]
public Vector2 Range
{
get => m_splineExtrude.Range;
set => m_splineExtrude.Range = value;
}
[Percentage(0, 1), InspectorDraw]
public float Head
{
get => Range.x;
set => Range = new(value, Range.y);
}
[Percentage(0, 1), InspectorDraw]
public float Tail
{
get => Range.y;
set => Range = new(Range.x, value);
}
[Percentage(0, 1), InspectorDraw]
public float Duration
{
get => Range.y - Range.x;
set => Tail = Head + value;
}
private void Reset()
{
m_splineExtrude = GetComponent<SplineExtrude>();
m_splineContainer = GetComponent<SplineContainer>();
if (m_splineExtrude != null)
m_splineExtrude.Container = m_splineContainer;
}
void Start()
{
if (m_splineExtrude == null)
m_splineExtrude = GetComponent<SplineExtrude>();
if (m_splineContainer == null)
{
m_splineContainer = GetComponent<SplineContainer>();
m_splineExtrude.Container = m_splineContainer;
}
}
private void LateUpdate()
{
if ((int)performanceMode >= (int)PerformanceIndicator.PerformanceMode.L8)
{
if (childPoints.Count != knots.Count)
RebuildAll();
else
ResetPoints();
m_splineExtrude.Rebuild();
}
}
[Content]
public void RebuildAll()
{
int lastcount = knots.Count;
if (knots.Count < childPoints.Count)
{
knots.AddRange(new BezierKnot[childPoints.Count - knots.Count]);
}
else if (knots.Count == childPoints.Count)
{
}
else
{
knots = new BezierKnot[childPoints.Count].ToList();
}
MainSpline.Knots = knots;
for (int i = 0, e = childPoints.Count; i < e; i++)
{
MainSpline.SetKnot(i, new BezierKnot(childPoints[i].transform.localPosition));
}
for (int i = childPoints.Count, e = lastcount; i < e; i++)
{
MainSpline.RemoveAt(i);
}
}
[Content]
public void ResetPoints()
{
for (int i = 0, e = childPoints.Count; i < e; i++)
{
MainSpline.SetKnot(i, knots[i] = new BezierKnot(childPoints[i].transform.localPosition));
}
}
[Content]
[return: ReturnNotNull]
public LinePoint AddChild()
{
var trans = new GameObject("Point").AddComponent<LinePoint>();
if (childPoints.Count > 0)
{
trans.transform.SetParent(childPoints[^1].transform.parent);
trans.transform.position = childPoints[^1].transform.position;
}
childPoints.Add(trans);
if (HierarchyWindow.instance && HierarchyWindow.instance.ContainsReference(this))
{
var item = HierarchyWindow.instance.GetReferenceItem(this)
.CreateSubPropertyItemWithBinders(trans.gameObject)[0];
item.ref_value.GetComponent<HierarchyItem>().title = trans.gameObject.name;
}
RebuildAll();
return trans;
}
}
}
#else
#endif

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c2e1401c85b3d1746a4547fe717962d5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c97f48f95d09b224fa9253e9503743a3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,83 @@
using System.Collections;
using UnityEngine;
namespace Convention
{
namespace VFX
{
namespace MutiSceneView
{
public class CameraView : MonoBehaviour
{
[Resources,Header("Use \"MutiSceneView\" Shader to generate material")] public Material LinkMaterial;
[Resources, Header("LEDPatternResolution")] public Transform First;
[Resources] public Transform Second;
[Setting,Header("SwitchAnimation")] public float Duration = 1f;
[Setting] public AnimationCurve TickerCurve = AnimationCurve.Linear(0, 0, 1, 1);
[Setting, Header("LEDPatternResolution")] public AnimationCurve LEDCurve = AnimationCurve.Linear(1, 100, 5, 500);
[Content, OnlyPlayMode, Ignore] public bool IsDisplayAnimation = false;
private void OnEnable()
{
if (First == null)
First = Camera.main.transform;
if(Second==null)
Second = gameObject.transform;
}
private IEnumerator DoLoadTexture()
{
IsDisplayAnimation = true;
float Ticker = 0;
while (Ticker < Duration)
{
Ticker += Time.deltaTime;
LinkMaterial.SetFloat("_SwitchAnimation", TickerCurve.Evaluate(Ticker / Duration));
yield return null;
}
LinkMaterial.SetFloat("_SwitchAnimation", TickerCurve.Evaluate(1));
IsDisplayAnimation = false;
}
private IEnumerator DoUnloadTexture()
{
IsDisplayAnimation = true;
float Ticker = Duration;
while (Ticker < Duration)
{
Ticker -= Time.deltaTime;
LinkMaterial.SetFloat("_SwitchAnimation", TickerCurve.Evaluate(Ticker / Duration));
yield return null;
}
LinkMaterial.SetFloat("_SwitchAnimation", TickerCurve.Evaluate(0));
IsDisplayAnimation = false;
}
public void LoadTextureView()
{
StopCoroutine(nameof(DoLoadTexture));
StartCoroutine(DoLoadTexture());
}
public void LoadTextureView(RenderTexture texture)
{
LinkMaterial.SetTexture("_ScreenColor", texture);
StopCoroutine(nameof(DoLoadTexture));
StartCoroutine(DoLoadTexture());
}
public void LoadTextureView(Camera camera)
{
LinkMaterial.SetTexture("_ScreenColor", camera.activeTexture);
StopCoroutine(nameof(DoLoadTexture));
StartCoroutine(DoLoadTexture());
}
public void UnloadTextureView()
{
StopCoroutine(nameof(DoUnloadTexture));
StartCoroutine(DoUnloadTexture());
}
private void Update()
{
LinkMaterial.SetFloat("_LEDPatternResolution", Mathf.Clamp(LEDCurve.Evaluate((First.position - Second.position).magnitude), 10, 1000));
}
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 08bf7173b9ac7254b9e68cfccbecea64
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: be64c4a17e7d11847942454405ae536d
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7681734a418048b469b8cfec86ad6cc3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

View File

@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: b3e842317f7e91341add724eded7db6e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7d44fe305e70ac9439d05322cbebe2f8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3738843890826999335
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: OutputTexture
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
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}
- 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:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _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}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 534b598e07ec33d48ba580627d4dc706
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,40 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!84 &8400000
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: OutputTexture
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 5
m_Width: 256
m_Height: 256
m_AntiAliasing: 1
m_MipCount: -1
m_DepthStencilFormat: 94
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_EnableRandomWrite: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_ShadowSamplingMode: 2

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7eef7514af214f44593e25474e449deb
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,84 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-1583321362557774867
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Template
m_Shader: {fileID: -6465566751694194690, guid: be64c4a17e7d11847942454405ae536d,
type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _REFLECTION_PROBE_BOX_PROJECTION
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _SampleTexture2D_7993b56c1e704a33b1a41d663b2db587_Texture_1_Texture2D:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ScreenColor:
m_Texture: {fileID: 8400000, guid: 7eef7514af214f44593e25474e449deb, type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransitionMap:
m_Texture: {fileID: 2800000, guid: b3e842317f7e91341add724eded7db6e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Triplanar_1f79d4637eaa400fa82facc9bcd6a4eb_Texture_1_Texture2D:
m_Texture: {fileID: 0}
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:
- _Exposure: 0.45
- _LEDPatternResolution: 100
- _MaxPixelation: 9
- _MinimumBlackness: 0.4
- _Pixelation: 1
- _QueueControl: 0
- _QueueOffset: 0
- _REFLECTION_PROBE_BOX_PROJECTION: 1
- _SwitchAnimation: 1
m_Colors:
- _Color: {r: 0, g: 0, b: 0, a: 1}
- _ColorFilter: {r: 0.7411765, g: 0.8392157, b: 1, a: 1}
- _TransitionEdgeColor: {r: 7.1354446, g: 2.9139512, b: 0.41094184, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 01540b182228471469be4b2749a2570e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 527296ae36ce6f54595619c0af559ae1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,676 @@
{
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "b9cb35939f0348ffa63022ea75f97dc5",
"m_Properties": [
{
"m_Id": "ca694166b9a647c19eddedbfe07245c5"
},
{
"m_Id": "193624483ff048a9ad546f20a3e56a15"
}
],
"m_Keywords": [],
"m_Dropdowns": [],
"m_CategoryData": [
{
"m_Id": "b5c8a503e55a470f89ed9fcf5b79f1e8"
}
],
"m_Nodes": [
{
"m_Id": "32671c3f35df4552b294b569ccd9476d"
},
{
"m_Id": "bd081b1a90b243fb9fdea1f2892525aa"
},
{
"m_Id": "50abf01fc3ef464997d311585cd35d65"
},
{
"m_Id": "34c415c13db443779d61cc6ac612147c"
},
{
"m_Id": "f9dd103a2a5847b0844470325a7216bc"
},
{
"m_Id": "55b8fefc701c4153a564e81fba354593"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "34c415c13db443779d61cc6ac612147c"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "f9dd103a2a5847b0844470325a7216bc"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "50abf01fc3ef464997d311585cd35d65"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "34c415c13db443779d61cc6ac612147c"
},
"m_SlotId": 2
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "55b8fefc701c4153a564e81fba354593"
},
"m_SlotId": 1
},
"m_InputSlot": {
"m_Node": {
"m_Id": "32671c3f35df4552b294b569ccd9476d"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "bd081b1a90b243fb9fdea1f2892525aa"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "f9dd103a2a5847b0844470325a7216bc"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "f9dd103a2a5847b0844470325a7216bc"
},
"m_SlotId": 3
},
"m_InputSlot": {
"m_Node": {
"m_Id": "55b8fefc701c4153a564e81fba354593"
},
"m_SlotId": 0
}
}
],
"m_VertexContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_FragmentContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_PreviewData": {
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
},
"preventRotation": false
},
"m_Path": "Sub Graphs",
"m_GraphPrecision": 1,
"m_PreviewMode": 2,
"m_OutputNode": {
"m_Id": "32671c3f35df4552b294b569ccd9476d"
},
"m_ActiveTargets": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "0617e91554fb41f7979277807d8a2352",
"m_Id": 1,
"m_DisplayName": "Result",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Result",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "1361778807534c0fb6fe6c70d1037202",
"m_Id": 0,
"m_DisplayName": "In",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "In",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "1767d2ba2fec4f0694270aec0ad1ff28",
"m_Id": 2,
"m_DisplayName": "Y",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Y",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"Y"
]
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "193624483ff048a9ad546f20a3e56a15",
"m_Guid": {
"m_GuidSerialized": "dae16e9c-4abc-446f-aee8-36d695dd5f77"
},
"m_Name": "DepthDiff",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "DepthDiff",
"m_DefaultReferenceName": "_DepthDiff",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": 0.0,
"m_FloatType": 0,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "2044fb07811645bebb58bde1548aaf87",
"m_Id": 0,
"m_DisplayName": "In",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "In",
"m_StageCapability": 3,
"m_Value": {
"x": -1.0,
"y": -1.0,
"z": -1.0,
"w": -1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode",
"m_ObjectId": "32671c3f35df4552b294b569ccd9476d",
"m_Group": {
"m_Id": ""
},
"m_Name": "Output",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 72.0,
"y": -39.0,
"width": 121.0,
"height": 77.0
}
},
"m_Slots": [
{
"m_Id": "0617e91554fb41f7979277807d8a2352"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"IsFirstSlotValid": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2Node",
"m_ObjectId": "34c415c13db443779d61cc6ac612147c",
"m_Group": {
"m_Id": ""
},
"m_Name": "Vector 2",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -640.0,
"y": -12.0,
"width": 128.0,
"height": 101.0
}
},
"m_Slots": [
{
"m_Id": "ce547ae6b0f64c55a8955730112136e1"
},
{
"m_Id": "1767d2ba2fec4f0694270aec0ad1ff28"
},
{
"m_Id": "4d85a9eef8674f2a8f533e6ec79b2642"
}
],
"synonyms": [
"2",
"v2",
"vec2",
"float2"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Value": {
"x": 0.0,
"y": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "4d85a9eef8674f2a8f533e6ec79b2642",
"m_Id": 0,
"m_DisplayName": "Out",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "50abf01fc3ef464997d311585cd35d65",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -824.0,
"y": 69.0,
"width": 129.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "9352089a91f54244ace179a073b90b53"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "ca694166b9a647c19eddedbfe07245c5"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SaturateNode",
"m_ObjectId": "55b8fefc701c4153a564e81fba354593",
"m_Group": {
"m_Id": ""
},
"m_Name": "Saturate",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -115.0,
"y": -39.0,
"width": 128.0,
"height": 94.0
}
},
"m_Slots": [
{
"m_Id": "1361778807534c0fb6fe6c70d1037202"
},
{
"m_Id": "d1bd45556298436abad7ec98eb6664f6"
}
],
"synonyms": [
"clamp"
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "6c586efa135141b4885a773f93d0432b",
"m_Id": 1,
"m_DisplayName": "In Min Max",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "InMinMax",
"m_StageCapability": 3,
"m_Value": {
"x": -1.0,
"y": 1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "7d1733278eb24875b12dfee1b839747c",
"m_Id": 0,
"m_DisplayName": "DepthDiff",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "9352089a91f54244ace179a073b90b53",
"m_Id": 0,
"m_DisplayName": "MaxDepth",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "b5c8a503e55a470f89ed9fcf5b79f1e8",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "193624483ff048a9ad546f20a3e56a15"
},
{
"m_Id": "ca694166b9a647c19eddedbfe07245c5"
}
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "bd081b1a90b243fb9fdea1f2892525aa",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -592.0,
"y": -87.0,
"width": 126.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "7d1733278eb24875b12dfee1b839747c"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "193624483ff048a9ad546f20a3e56a15"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "c50a447c7b244549810167e1c38b8380",
"m_Id": 2,
"m_DisplayName": "Out Min Max",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "OutMinMax",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "ca694166b9a647c19eddedbfe07245c5",
"m_Guid": {
"m_GuidSerialized": "10f7117e-adea-4d3c-a4fc-547b40982f90"
},
"m_Name": "MaxDepth",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "MaxDepth",
"m_DefaultReferenceName": "_MaxDepth",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": 1.0,
"m_FloatType": 0,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "ce547ae6b0f64c55a8955730112136e1",
"m_Id": 1,
"m_DisplayName": "X",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "X",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "d1bd45556298436abad7ec98eb6664f6",
"m_Id": 1,
"m_DisplayName": "Out",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "d1c14eeb77da4463bd80be133287f4c7",
"m_Id": 3,
"m_DisplayName": "Out",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.RemapNode",
"m_ObjectId": "f9dd103a2a5847b0844470325a7216bc",
"m_Group": {
"m_Id": ""
},
"m_Name": "Remap",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -349.0,
"y": -39.0,
"width": 186.0,
"height": 142.0
}
},
"m_Slots": [
{
"m_Id": "2044fb07811645bebb58bde1548aaf87"
},
{
"m_Id": "6c586efa135141b4885a773f93d0432b"
},
{
"m_Id": "c50a447c7b244549810167e1c38b8380"
},
{
"m_Id": "d1c14eeb77da4463bd80be133287f4c7"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 9c905e95edd9eaf41889375c33b152d0
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 2fbfe26371e0c6449bb192e5927b21b1
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7922ee46e5cce5d4ea279f22a3d7ee89
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 86e42a367c373ac4081be98b2e2e665a
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f8854275c268b7341bffd0cf98d2eac8
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 93640d01559efae4d9749593adaad958
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 96a7a3bd3da9308418212136c26588e1
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: c1b155a205549b948920d7487ccf20f6
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

View File

@@ -0,0 +1,648 @@
{
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "7b55909c76714c2db4d48e664dbcc92b",
"m_Properties": [
{
"m_Id": "173f8d8c3d5f48e58358e9bc8a6718d9"
},
{
"m_Id": "351c706bfb6b4a2ab243a648fa5d12fa"
},
{
"m_Id": "f4801762327f410b854ba9c13cebfcde"
}
],
"m_Keywords": [],
"m_Dropdowns": [],
"m_CategoryData": [
{
"m_Id": "84feca52a05a4342ac915d4ada6ab344"
}
],
"m_Nodes": [
{
"m_Id": "c4af25c4e3784944aa9d1ab0ee575ad6"
},
{
"m_Id": "02e9280a39d144fc96309dea8957aed0"
},
{
"m_Id": "a4d0462fcb5f45cc8ec9e85d3828575f"
},
{
"m_Id": "14b94eccbc4247fcbd716b37d577aec9"
},
{
"m_Id": "11168e770bf74154953eb7f7a740354c"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "02e9280a39d144fc96309dea8957aed0"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "11168e770bf74154953eb7f7a740354c"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "11168e770bf74154953eb7f7a740354c"
},
"m_SlotId": 3
},
"m_InputSlot": {
"m_Node": {
"m_Id": "c4af25c4e3784944aa9d1ab0ee575ad6"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "14b94eccbc4247fcbd716b37d577aec9"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "11168e770bf74154953eb7f7a740354c"
},
"m_SlotId": 2
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "a4d0462fcb5f45cc8ec9e85d3828575f"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "11168e770bf74154953eb7f7a740354c"
},
"m_SlotId": 1
}
}
],
"m_VertexContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_FragmentContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_PreviewData": {
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
},
"preventRotation": false
},
"m_Path": "Sub Graphs",
"m_GraphPrecision": 1,
"m_PreviewMode": 2,
"m_OutputNode": {
"m_Id": "c4af25c4e3784944aa9d1ab0ee575ad6"
},
"m_ActiveTargets": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "02e9280a39d144fc96309dea8957aed0",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -727.0,
"y": -729.0,
"width": 93.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "32888c42b68046e598934534dc363636"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "173f8d8c3d5f48e58358e9bc8a6718d9"
}
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "11168e770bf74154953eb7f7a740354c",
"m_Group": {
"m_Id": ""
},
"m_Name": "DepthToWorldPos (Custom Function)",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -553.0,
"y": -745.0,
"width": 259.0,
"height": 142.0
}
},
"m_Slots": [
{
"m_Id": "5594f2633b7348c5a865cc1ae767f5e6"
},
{
"m_Id": "4596ee9afe7a4377a2d718ea83de035e"
},
{
"m_Id": "f367a0b113ca4b2691d186fc429d6688"
},
{
"m_Id": "21ba980160754584983d206639aa661e"
}
],
"synonyms": [
"code",
"HLSL"
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 1,
"m_FunctionName": "DepthToWorldPos",
"m_FunctionSource": "",
"m_FunctionBody": "PositionWS = ComputeWorldSpacePosition(UV, depth, _matrix);"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "14b94eccbc4247fcbd716b37d577aec9",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -803.0,
"y": -620.0,
"width": 211.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "644b727c1ef047d8b0afa7256b6db1b2"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "f4801762327f410b854ba9c13cebfcde"
}
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector2ShaderProperty",
"m_ObjectId": "173f8d8c3d5f48e58358e9bc8a6718d9",
"m_Guid": {
"m_GuidSerialized": "5a6ab260-a1eb-46a0-92cd-bcb38d75ec15"
},
"m_Name": "UV",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "UV",
"m_DefaultReferenceName": "_UV",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "21ba980160754584983d206639aa661e",
"m_Id": 3,
"m_DisplayName": "PositionWS",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "PositionWS",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "32888c42b68046e598934534dc363636",
"m_Id": 0,
"m_DisplayName": "UV",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "351c706bfb6b4a2ab243a648fa5d12fa",
"m_Guid": {
"m_GuidSerialized": "5565f1fc-b268-41d0-9471-d967aebb7ddc"
},
"m_Name": "Depth",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "Depth",
"m_DefaultReferenceName": "_Depth",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": false,
"hlslDeclarationOverride": 0,
"m_Hidden": false,
"m_Value": 0.0,
"m_FloatType": 0,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "4596ee9afe7a4377a2d718ea83de035e",
"m_Id": 1,
"m_DisplayName": "depth",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "depth",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "5594f2633b7348c5a865cc1ae767f5e6",
"m_Id": 0,
"m_DisplayName": "UV",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "UV",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Matrix4MaterialSlot",
"m_ObjectId": "644b727c1ef047d8b0afa7256b6db1b2",
"m_Id": 0,
"m_DisplayName": "_InverseViewProjection",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"e00": 1.0,
"e01": 0.0,
"e02": 0.0,
"e03": 0.0,
"e10": 0.0,
"e11": 1.0,
"e12": 0.0,
"e13": 0.0,
"e20": 0.0,
"e21": 0.0,
"e22": 1.0,
"e23": 0.0,
"e30": 0.0,
"e31": 0.0,
"e32": 0.0,
"e33": 1.0
},
"m_DefaultValue": {
"e00": 1.0,
"e01": 0.0,
"e02": 0.0,
"e03": 0.0,
"e10": 0.0,
"e11": 1.0,
"e12": 0.0,
"e13": 0.0,
"e20": 0.0,
"e21": 0.0,
"e22": 1.0,
"e23": 0.0,
"e30": 0.0,
"e31": 0.0,
"e32": 0.0,
"e33": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "84feca52a05a4342ac915d4ada6ab344",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "173f8d8c3d5f48e58358e9bc8a6718d9"
},
{
"m_Id": "351c706bfb6b4a2ab243a648fa5d12fa"
},
{
"m_Id": "f4801762327f410b854ba9c13cebfcde"
}
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "85adc10f59034083a0358eccdfe6b8a4",
"m_Id": 0,
"m_DisplayName": "Depth",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "a30ae2a8e1dc45eab3373720e3ca914f",
"m_Id": 1,
"m_DisplayName": "Position",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Position",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "a4d0462fcb5f45cc8ec9e85d3828575f",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -741.0,
"y": -668.0,
"width": 107.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "85adc10f59034083a0358eccdfe6b8a4"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "351c706bfb6b4a2ab243a648fa5d12fa"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode",
"m_ObjectId": "c4af25c4e3784944aa9d1ab0ee575ad6",
"m_Group": {
"m_Id": ""
},
"m_Name": "Output",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -266.0000305175781,
"y": -744.9999389648438,
"width": 97.00001525878906,
"height": 77.0
}
},
"m_Slots": [
{
"m_Id": "a30ae2a8e1dc45eab3373720e3ca914f"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"IsFirstSlotValid": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Matrix4MaterialSlot",
"m_ObjectId": "f367a0b113ca4b2691d186fc429d6688",
"m_Id": 2,
"m_DisplayName": "_matrix",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "_matrix",
"m_StageCapability": 3,
"m_Value": {
"e00": 1.0,
"e01": 0.0,
"e02": 0.0,
"e03": 0.0,
"e10": 0.0,
"e11": 1.0,
"e12": 0.0,
"e13": 0.0,
"e20": 0.0,
"e21": 0.0,
"e22": 1.0,
"e23": 0.0,
"e30": 0.0,
"e31": 0.0,
"e32": 0.0,
"e33": 1.0
},
"m_DefaultValue": {
"e00": 1.0,
"e01": 0.0,
"e02": 0.0,
"e03": 0.0,
"e10": 0.0,
"e11": 1.0,
"e12": 0.0,
"e13": 0.0,
"e20": 0.0,
"e21": 0.0,
"e22": 1.0,
"e23": 0.0,
"e30": 0.0,
"e31": 0.0,
"e32": 0.0,
"e33": 1.0
}
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Matrix4ShaderProperty",
"m_ObjectId": "f4801762327f410b854ba9c13cebfcde",
"m_Guid": {
"m_GuidSerialized": "c414ac1b-5a32-4b59-9659-a3b6713dcccf"
},
"m_Name": "_InverseViewProjection",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "_InverseViewProjection",
"m_DefaultReferenceName": "_InverseViewProjection",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": false,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": true,
"hlslDeclarationOverride": 2,
"m_Hidden": false,
"m_Value": {
"e00": 1.0,
"e01": 0.0,
"e02": 0.0,
"e03": 0.0,
"e10": 0.0,
"e11": 1.0,
"e12": 0.0,
"e13": 0.0,
"e20": 0.0,
"e21": 0.0,
"e22": 1.0,
"e23": 0.0,
"e30": 0.0,
"e31": 0.0,
"e32": 0.0,
"e33": 1.0
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 0a6a1b3e3ce633943ae5f7729251cf7e
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}