Archived
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53c23effe5 | ||
|
|
76edfff94f | ||
|
|
ca8149da1f | ||
|
|
d7a908352a |
No files matched your search
@@ -1,24 +0,0 @@
|
||||
#if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED)
|
||||
StructuredBuffer<float3> _Positions;
|
||||
#endif
|
||||
|
||||
float _Step;
|
||||
|
||||
void ConfigureProcedural()
|
||||
{
|
||||
#if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED)
|
||||
float3 position = _Positions[unity_InstanceID];
|
||||
|
||||
unity_ObjectToWorld = 0.0;
|
||||
unity_ObjectToWorld._m03_m13_m23_m33 = float4(position, 1.0);
|
||||
unity_ObjectToWorld._m00_m11_m22 = _Step;
|
||||
#endif
|
||||
}
|
||||
|
||||
void ShaderGraphFunction_float (float3 In, out float3 Out) {
|
||||
Out = In;
|
||||
}
|
||||
|
||||
void ShaderGraphFunction_half (half3 In, out half3 Out) {
|
||||
Out = In;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52ba3338a3c5fd040985e2d7cd13ae29
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,78 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Point Surface GPU
|
||||
m_Shader: {fileID: 4800000, guid: 777e5d31099aed84eab73d2aff7dcfca, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 584eab0d393b59e40ac387043a54b24f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,35 +0,0 @@
|
||||
Shader "Graph/Point Surface GPU"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Smoothness("Smoothness", Range(0, 1)) = 0.5
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma surface ConfigureSurface Standard fullforwardshadows addshadow
|
||||
#pragma instancing_options assumeuniformscaling procedural:ConfigureProcedural
|
||||
#pragma editor_sync_compilation
|
||||
#pragma target 4.5
|
||||
|
||||
#include "Point GPU.hlsl"
|
||||
|
||||
struct Input
|
||||
{
|
||||
float3 worldPos;
|
||||
};
|
||||
|
||||
float _Smoothness;
|
||||
|
||||
void ConfigureSurface(Input input, inout SurfaceOutputStandard surface)
|
||||
{
|
||||
surface.Albedo = saturate(input.worldPos * 0.5 + 0.5);
|
||||
surface.Smoothness = _Smoothness;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
|
||||
FallBack "Diffuse"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 777e5d31099aed84eab73d2aff7dcfca
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,90 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-3089080242542461839
|
||||
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: 2
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Point URP GPU
|
||||
m_Shader: {fileID: -6465566751694194690, guid: edb00fc61da38e141a5047af96ae1a0a,
|
||||
type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
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}
|
||||
- _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}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _Blend: 0
|
||||
- _BumpScale: 1
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DstBlend: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 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}
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e470d4aed9c37a448b5bccf749811b9d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,128 +0,0 @@
|
||||
{
|
||||
"m_SerializedProperties": [
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"8ed742a3-3f74-471c-a1a5-16af63ef5b0e\"\n },\n \"m_Name\": \"Smoothness\",\n \"m_DefaultReferenceName\": \"Vector1_5FB73066\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": 0.5,\n \"m_FloatType\": 1,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}"
|
||||
}
|
||||
],
|
||||
"m_SerializedKeywords": [],
|
||||
"m_SerializableNodes": [
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.ShaderGraph.PBRMasterNode"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"37ad4730-8096-4fd1-858f-994f2a0a4afb\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"PBR Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": false,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -77.0,\n \"y\": -18.0,\n \"width\": 200.0,\n \"height\": 125.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Albedo\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapabilityLine truncated
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.ShaderGraph.PropertyNode"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"0b3c1510-7eb1-4a70-b16a-1c9b6d8e2e94\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -401.0,\n \"y\": 161.0,\n \"width\": 149.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"8ed742a3-3f74-471c-a1a5-16af63ef5b0e\"\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.ShaderGraph.PositionNode"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"3941bc28-9a90-4cef-baef-cb93dcd31e2e\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Position\",\n \"m_NodeVersion\": 1,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -913.0,\n \"y\": 32.0,\n \"width\": 206.0,\n \"height\": 130.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 1,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 2\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.ShaderGraph.MultiplyNode"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"835eec7d-379d-4954-90eb-69a5832644fa\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": false,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -684.0,\n \"y\": 34.0,\n \"width\": 135.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.5,\\n \\\"e01\\\": 0.5,\\n \\\"e02\\\": 0.5,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.ShaderGraph.AddNode"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"5136b7d0-bfa6-4617-bdcc-ea98f3621582\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Add\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": false,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -541.0,\n \"y\": 35.0,\n \"width\": 135.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.ShaderGraph.SaturateNode"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"0f359e01-5605-4c78-9135-ea639500982e\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Saturate\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -389.0,\n \"y\": 34.0,\n \"width\": 139.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 1,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.ShaderGraph.CustomFunctionNode"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"c83162c3-2039-4dc0-841e-bf7b79ecb928\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Custom Function\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -673.0,\n \"y\": -143.0,\n \"width\": 164.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SourceType\": 0,\n \"m_FunctionName\": \"ShaderGraphFunction\",\n \"m_FunctionSource\": \"52ba3338a3c5fd040985e2d7cd13ae29\",\n \"m_FunctionBody\": \"#pragma instancing_options assumeuniformscaling procedural:ConfigureProcedural\\r\\n#pragma editor_sync_compilation\\r\\n\\r\\nOut = In;\"\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.ShaderGraph.PositionNode"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"87e3be23-835f-466c-a7aa-6e3163d0e35d\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Position\",\n \"m_NodeVersion\": 1,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -910.0,\n \"y\": -143.0,\n \"width\": 206.0,\n \"height\": 130.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 1,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_Space\": 0\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.ShaderGraph.CustomFunctionNode"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"7c90289c-03c0-467a-8ca6-408a8d6f383e\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Custom Function\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -497.0,\n \"y\": -143.0,\n \"width\": 164.0,\n \"height\": 94.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector3MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": false,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SourceType\": 1,\n \"m_FunctionName\": \"InjectPragmas\",\n \"m_FunctionSource\": \"\",\n \"m_FunctionBody\": \"#pragma instancing_options assumeuniformscaling procedural:ConfigureProcedural\\r\\n#pragma editor_sync_compilation\\r\\n\\r\\nOut = In;\"\n}"
|
||||
}
|
||||
],
|
||||
"m_Groups": [],
|
||||
"m_StickyNotes": [],
|
||||
"m_SerializableEdges": [
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.Graphing.Edge"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"3941bc28-9a90-4cef-baef-cb93dcd31e2e\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"835eec7d-379d-4954-90eb-69a5832644fa\"\n }\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.Graphing.Edge"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"835eec7d-379d-4954-90eb-69a5832644fa\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"5136b7d0-bfa6-4617-bdcc-ea98f3621582\"\n }\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.Graphing.Edge"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"5136b7d0-bfa6-4617-bdcc-ea98f3621582\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0f359e01-5605-4c78-9135-ea639500982e\"\n }\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.Graphing.Edge"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"0f359e01-5605-4c78-9135-ea639500982e\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"37ad4730-8096-4fd1-858f-994f2a0a4afb\"\n }\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.Graphing.Edge"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"0b3c1510-7eb1-4a70-b16a-1c9b6d8e2e94\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 5,\n \"m_NodeGUIDSerialized\": \"37ad4730-8096-4fd1-858f-994f2a0a4afb\"\n }\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.Graphing.Edge"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"87e3be23-835f-466c-a7aa-6e3163d0e35d\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"c83162c3-2039-4dc0-841e-bf7b79ecb928\"\n }\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.Graphing.Edge"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"c83162c3-2039-4dc0-841e-bf7b79ecb928\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"7c90289c-03c0-467a-8ca6-408a8d6f383e\"\n }\n}"
|
||||
},
|
||||
{
|
||||
"typeInfo": {
|
||||
"fullName": "UnityEditor.Graphing.Edge"
|
||||
},
|
||||
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"7c90289c-03c0-467a-8ca6-408a8d6f383e\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 9,\n \"m_NodeGUIDSerialized\": \"37ad4730-8096-4fd1-858f-994f2a0a4afb\"\n }\n}"
|
||||
}
|
||||
],
|
||||
"m_PreviewData": {
|
||||
"serializedMesh": {
|
||||
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
|
||||
"m_Guid": ""
|
||||
}
|
||||
},
|
||||
"m_Path": "Shader Graphs",
|
||||
"m_ConcretePrecision": 0,
|
||||
"m_ActiveOutputNodeGuidSerialized": "37ad4730-8096-4fd1-858f-994f2a0a4afb"
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edb00fc61da38e141a5047af96ae1a0a
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
@@ -130,7 +130,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 75389716}
|
||||
- component: {fileID: 75389717}
|
||||
- component: {fileID: 75389715}
|
||||
m_Layer: 0
|
||||
m_Name: Graph
|
||||
m_TagString: Untagged
|
||||
@@ -138,6 +138,25 @@ GameObject:
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &75389715
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 75389714}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 14cd06bfa92d53e4ebc0cde4a0e39db8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
pointPrefab: {fileID: 5221897554875366738, guid: d73a635284aa0ca4eb9cc40879b3267d,
|
||||
type: 3}
|
||||
resolution: 50
|
||||
function: 4
|
||||
transitionMode: 2
|
||||
functionDuration: 1
|
||||
transitionDuration: 1
|
||||
--- !u!4 &75389716
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -152,26 +171,6 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &75389717
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 75389714}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e99d61420a0d1f459f961121d6fbe77, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
computeShader: {fileID: 7200000, guid: c7f7fcb3b4a90614b80aa341489318e7, type: 3}
|
||||
material: {fileID: 2100000, guid: e470d4aed9c37a448b5bccf749811b9d, type: 2}
|
||||
mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
resolution: 1000
|
||||
function: 4
|
||||
transitionMode: 1
|
||||
functionDuration: 1
|
||||
transitionDuration: 1
|
||||
--- !u!1 &705507993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
#pragma kernel WaveKernel
|
||||
#pragma kernel WaveToMultiWaveKernel
|
||||
#pragma kernel WaveToRippleKernel
|
||||
#pragma kernel WaveToSphereKernel
|
||||
#pragma kernel WaveToTorusKernel
|
||||
|
||||
#pragma kernel MultiWaveToWaveKernel
|
||||
#pragma kernel MultiWaveKernel
|
||||
#pragma kernel MultiWaveToRippleKernel
|
||||
#pragma kernel MultiWaveToSphereKernel
|
||||
#pragma kernel MultiWaveToTorusKernel
|
||||
|
||||
#pragma kernel RippleToWaveKernel
|
||||
#pragma kernel RippleToMultiWaveKernel
|
||||
#pragma kernel RippleKernel
|
||||
#pragma kernel RippleToSphereKernel
|
||||
#pragma kernel RippleToTorusKernel
|
||||
|
||||
#pragma kernel SphereToWaveKernel
|
||||
#pragma kernel SphereToMultiWaveKernel
|
||||
#pragma kernel SphereToRippleKernel
|
||||
#pragma kernel SphereKernel
|
||||
#pragma kernel SphereToTorusKernel
|
||||
|
||||
#pragma kernel TorusToWaveKernel
|
||||
#pragma kernel TorusToMultiWaveKernel
|
||||
#pragma kernel TorusToRippleKernel
|
||||
#pragma kernel TorusToSphereKernel
|
||||
#pragma kernel TorusKernel
|
||||
|
||||
RWStructuredBuffer<float3> _Positions;
|
||||
|
||||
uint _Resolution;
|
||||
|
||||
float _Step;
|
||||
float _Time;
|
||||
float _TransitionProgress;
|
||||
|
||||
float2 GetUV(uint3 id)
|
||||
{
|
||||
return (id.xy + 0.5) * _Step - 1.0;
|
||||
}
|
||||
|
||||
void SetPositions(uint3 id, float3 positions)
|
||||
{
|
||||
if (id.x < _Resolution && id.y < _Resolution)
|
||||
{
|
||||
_Positions[id.x + id.y * _Resolution] = positions;
|
||||
}
|
||||
}
|
||||
|
||||
#define PI 3.14159265358979323846
|
||||
|
||||
float3 Wave(float u, float v, float t)
|
||||
{
|
||||
float3 p;
|
||||
p.x = u;
|
||||
p.y = sin(PI * (u + v + t));
|
||||
p.z = v;
|
||||
return p;
|
||||
}
|
||||
|
||||
float3 MultiWave(float u, float v, float t)
|
||||
{
|
||||
float3 p;
|
||||
p.x = u;
|
||||
p.y = sin(PI * (u + 0.5 * t));
|
||||
p.y += 0.5 * sin(2.0 * PI * (v + t));
|
||||
p.y += sin(PI * (u + v + 0.25 * t));
|
||||
p.y *= 1.0 / 2.5;
|
||||
p.z = v;
|
||||
return p;
|
||||
}
|
||||
|
||||
float3 Ripple(float u, float v, float t)
|
||||
{
|
||||
float d = sqrt(u * u + v * v);
|
||||
float3 p;
|
||||
p.x = u;
|
||||
p.y = sin(PI * (4.0 * d - t));
|
||||
p.y /= 1.0 + 10.0 * d;
|
||||
p.z = v;
|
||||
return p;
|
||||
}
|
||||
|
||||
float3 Sphere(float u, float v, float t)
|
||||
{
|
||||
float r = 0.9 + 0.1 * sin(PI * (6.0 * u + 4.0 * v + t));
|
||||
float s = r * cos(0.5 * PI * v);
|
||||
float3 p;
|
||||
p.x = s * sin(PI * u);
|
||||
p.y = r * sin(0.5 * PI * v);
|
||||
p.z = s * cos(PI * u);
|
||||
return p;
|
||||
}
|
||||
|
||||
float3 Torus(float u, float v, float t)
|
||||
{
|
||||
float r1 = 0.7 + 0.1 * sin(PI * (6.0 * u + 0.5 * t));
|
||||
float r2 = 0.15 + 0.05 * sin(PI * (8.0 * u + 4.0 * v + 2.0 * t));
|
||||
float s = r1 + r2 * cos(PI * v);
|
||||
float3 p;
|
||||
p.x = s * sin(PI * u);
|
||||
p.y = r2 * sin(PI * v);
|
||||
p.z = s * cos(PI * u);
|
||||
return p;
|
||||
}
|
||||
|
||||
#define KERNEL_FUNCTION(function) \
|
||||
[numthreads(8, 8, 1)] \
|
||||
void function##Kernel(uint3 id : SV_DISPATCHTHREADID) \
|
||||
{ \
|
||||
float2 uv = GetUV(id); \
|
||||
SetPositions(id, function(uv.x, uv.y, _Time)); \
|
||||
}
|
||||
|
||||
KERNEL_FUNCTION(Wave)
|
||||
KERNEL_FUNCTION(MultiWave)
|
||||
KERNEL_FUNCTION(Ripple)
|
||||
KERNEL_FUNCTION(Sphere)
|
||||
KERNEL_FUNCTION(Torus)
|
||||
|
||||
#define KERNEL_MOPH_FUNCTION(functionA, functionB) \
|
||||
[numthreads(8, 8, 1)] \
|
||||
void functionA##To##functionB##Kernel(uint3 id : SV_DISPATCHTHREADID) \
|
||||
{ \
|
||||
float2 uv = GetUV(id); \
|
||||
float3 position = lerp(functionA(uv.x, uv.y, _Time), functionB(uv.x, uv.y, _Time), _TransitionProgress); \
|
||||
SetPositions(id, position); \
|
||||
}
|
||||
|
||||
KERNEL_MOPH_FUNCTION(Wave, MultiWave)
|
||||
KERNEL_MOPH_FUNCTION(Wave, Ripple)
|
||||
KERNEL_MOPH_FUNCTION(Wave, Sphere)
|
||||
KERNEL_MOPH_FUNCTION(Wave, Torus)
|
||||
|
||||
KERNEL_MOPH_FUNCTION(MultiWave, Wave)
|
||||
KERNEL_MOPH_FUNCTION(MultiWave, Ripple)
|
||||
KERNEL_MOPH_FUNCTION(MultiWave, Sphere)
|
||||
KERNEL_MOPH_FUNCTION(MultiWave, Torus)
|
||||
|
||||
KERNEL_MOPH_FUNCTION(Ripple, Wave)
|
||||
KERNEL_MOPH_FUNCTION(Ripple, MultiWave)
|
||||
KERNEL_MOPH_FUNCTION(Ripple, Sphere)
|
||||
KERNEL_MOPH_FUNCTION(Ripple, Torus)
|
||||
|
||||
KERNEL_MOPH_FUNCTION(Sphere, Wave)
|
||||
KERNEL_MOPH_FUNCTION(Sphere, MultiWave)
|
||||
KERNEL_MOPH_FUNCTION(Sphere, Ripple)
|
||||
KERNEL_MOPH_FUNCTION(Sphere, Torus)
|
||||
|
||||
KERNEL_MOPH_FUNCTION(Torus, Wave)
|
||||
KERNEL_MOPH_FUNCTION(Torus, MultiWave)
|
||||
KERNEL_MOPH_FUNCTION(Torus, Ripple)
|
||||
KERNEL_MOPH_FUNCTION(Torus, Sphere)
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c7f7fcb3b4a90614b80aa341489318e7
|
||||
ComputeShaderImporter:
|
||||
externalObjects: {}
|
||||
currentAPIMask: 4
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -9,8 +9,6 @@ public static class FunctionLibrary
|
||||
|
||||
private static Function[] functions = { Wave, MultiWave, Ripple, Sphere, Torus };
|
||||
|
||||
public static int functionCount => functions.Length;
|
||||
|
||||
public static Function GetFunction(FunctionName name)
|
||||
{
|
||||
return functions[(int)name];
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class GPUGraph : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
ComputeShader computeShader = default;
|
||||
|
||||
[SerializeField]
|
||||
Material material = default;
|
||||
|
||||
[SerializeField]
|
||||
Mesh mesh = default;
|
||||
|
||||
const int maxResolution = 1000;
|
||||
|
||||
[SerializeField, Range(10, maxResolution)]
|
||||
int resolution = 10;
|
||||
|
||||
[SerializeField]
|
||||
FunctionLibrary.FunctionName function = default;
|
||||
|
||||
public enum TransitionMode { Normal, Cycle, Random }
|
||||
|
||||
[SerializeField]
|
||||
TransitionMode transitionMode = TransitionMode.Normal;
|
||||
|
||||
[SerializeField, Min(0.0f)]
|
||||
float functionDuration = 1.0f;
|
||||
|
||||
[SerializeField, Min(0.0f)]
|
||||
float transitionDuration = 1.0f;
|
||||
|
||||
float duration = 0.0f;
|
||||
|
||||
bool transitioning;
|
||||
|
||||
FunctionLibrary.FunctionName transitionFunction;
|
||||
|
||||
ComputeBuffer positionsBuffer;
|
||||
|
||||
static readonly int positionsId = Shader.PropertyToID("_Positions");
|
||||
static readonly int resolutionId = Shader.PropertyToID("_Resolution");
|
||||
static readonly int stepId = Shader.PropertyToID("_Step");
|
||||
static readonly int timeId = Shader.PropertyToID("_Time");
|
||||
static readonly int transitionProgressId = Shader.PropertyToID("_TransitionProgress");
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
positionsBuffer = new ComputeBuffer(maxResolution * maxResolution, 3 * 4);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
positionsBuffer.Release();
|
||||
positionsBuffer = null;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
duration += Time.deltaTime;
|
||||
if (transitioning)
|
||||
{
|
||||
if (duration >= transitionDuration)
|
||||
{
|
||||
duration -= transitionDuration;
|
||||
transitioning = false;
|
||||
}
|
||||
}
|
||||
else if (duration >= functionDuration)
|
||||
{
|
||||
duration -= functionDuration;
|
||||
transitioning = true;
|
||||
transitionFunction = function;
|
||||
PickNextFunction();
|
||||
}
|
||||
UpdateFunctionOnGPU();
|
||||
}
|
||||
|
||||
private void PickNextFunction()
|
||||
{
|
||||
if (transitionMode == TransitionMode.Normal) return;
|
||||
function = transitionMode == TransitionMode.Cycle ?
|
||||
FunctionLibrary.GetNextFunctionName(function) :
|
||||
FunctionLibrary.GetRandomFunctionNameOtherThan(function);
|
||||
}
|
||||
|
||||
private void UpdateFunctionOnGPU()
|
||||
{
|
||||
var step = 2f / resolution;
|
||||
computeShader.SetInt(resolutionId, resolution);
|
||||
computeShader.SetFloat(stepId, step);
|
||||
computeShader.SetFloat(timeId, Time.time);
|
||||
if (transitioning)
|
||||
{
|
||||
computeShader.SetFloat(transitionProgressId, Mathf.SmoothStep(0f, 1f, duration / transitionDuration));
|
||||
}
|
||||
|
||||
var kernelIndex = (int)function +
|
||||
(int)(transitioning ? transitionFunction : function) * FunctionLibrary.functionCount;
|
||||
computeShader.SetBuffer(kernelIndex, positionsId, positionsBuffer);
|
||||
|
||||
var groups = Mathf.CeilToInt(resolution / 8f);
|
||||
computeShader.Dispatch(kernelIndex, groups, groups, 1);
|
||||
|
||||
material.SetBuffer(positionsId, positionsBuffer);
|
||||
material.SetFloat(stepId, step);
|
||||
var bounds = new Bounds(Vector3.zero, Vector3.one * (2f + 2f / resolution));
|
||||
Graphics.DrawMeshInstancedProcedural(mesh, 0, material, bounds, resolution * resolution);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e99d61420a0d1f459f961121d6fbe77
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -5,7 +5,7 @@ public class Graph : MonoBehaviour
|
||||
[SerializeField]
|
||||
Transform pointPrefab = default;
|
||||
|
||||
[SerializeField, Range(10, 200)]
|
||||
[SerializeField, Range(10, 100)]
|
||||
int resolution = 10;
|
||||
|
||||
[SerializeField]
|
||||
|
||||
Reference in new issue
Block a user