Search Unity

Unlit Billboard Shader (Universal RP)

Discussion in 'Shaders' started by danthoresen, Oct 5, 2019.

  1. danthoresen

    danthoresen

    Joined:
    Jan 25, 2015
    Posts:
    2
    Hi. I wonder if anyone can advise me how to fix this Unlit Billboard shader for UniversalRP. Sometimes it looks correct but other times it behaves very erratic (displaced, flickers, disappears) when rotating around.

    The shader is used in a material together with a Sprite Renderer on a quad. The material holds the spritesheet and the Sprite Renderer .sprite property holds a single sprite from the spritesheet.

    The effect I'm after is a billboard that is always facing camera but clamped at 90 degree angles, but at this point I'm happy with a traditional billboard shader.

    Screenshot from ShaderGraph: https://imgur.com/a/EFMz6ll

    See the erratic behavior here:
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,336
    Billboard shader and sprite renderer together seems a dangerous combination. Any billboard shader requires the meshes not be batched, and sprite renderers batch by default even if batching is disabled in the project. If you want to use sprites, control the rotation with a script. Otherwise you’ll need to use normal mesh renderers.
     
  3. danthoresen

    danthoresen

    Joined:
    Jan 25, 2015
    Posts:
    2
    Ah, that would explain the behavior. I started out with using a script, and for the enemies/NPC it's not really a problem, but the grass and foliage would mean there's a huge number of times the script is run. The reason I tried to do it using a shader and sprite is to reduce batching - by having only one material for all billboards.

    Perhaps a shader which takes a spritesheet.png as maintexture and use UV manipulation (based on exposed x,y,width,height properties) to draw parts of the spritesheet. That would (in my head) mean only one draw call for all billboards, or am I wrong?

    Thanks for the reply.
     
  4. mouurusai

    mouurusai

    Joined:
    Dec 2, 2011
    Posts:
    350
    Not any, it's can be avoided by pretty simple hack: collapse vertices positions to a single point, then use this point as origin instead of a zero point from (object to view) transformation, and use UV coords as displace vector.
    2019-10-06_04-15-01.png
    But it's seems inapplicable for sprites anyway, do a lack of way to setup uv or any other vertex attribute from api.
     
    Last edited: Oct 6, 2019
    danthoresen likes this.
  5. Chrisdbhr

    Chrisdbhr

    Joined:
    May 21, 2016
    Posts:
    19
    Here's a text that anyone can copy/paste in a Shader Graph window to get the nodes set (from @mouurusai reply):

    Code (Boo):
    1.  
    2. application/vnd.unity.graphview.elements {
    3.     "m_SGVersion": 0,
    4.     "m_Type": "UnityEditor.ShaderGraph.CopyPasteGraph",
    5.     "m_ObjectId": "a529cd3d5a4d4081a491584ef49e16f6",
    6.     "m_Edges": [
    7.         {
    8.             "m_OutputSlot": {
    9.                 "m_Node": {
    10.                     "m_Id": "cc0ffeb8d5044ff88c497033e900d5f0"
    11.                 },
    12.                 "m_SlotId": 0
    13.             },
    14.             "m_InputSlot": {
    15.                 "m_Node": {
    16.                     "m_Id": "f79922cb9a9a4383acfb582b430760f7"
    17.                 },
    18.                 "m_SlotId": 0
    19.             }
    20.         },
    21.         {
    22.             "m_OutputSlot": {
    23.                 "m_Node": {
    24.                     "m_Id": "f79922cb9a9a4383acfb582b430760f7"
    25.                 },
    26.                 "m_SlotId": 2
    27.             },
    28.             "m_InputSlot": {
    29.                 "m_Node": {
    30.                     "m_Id": "5f4c442016b94c9f82d4a77060003aea"
    31.                 },
    32.                 "m_SlotId": 0
    33.             }
    34.         },
    35.         {
    36.             "m_OutputSlot": {
    37.                 "m_Node": {
    38.                     "m_Id": "6c64134966644bc2a266968b562da4b2"
    39.                 },
    40.                 "m_SlotId": 0
    41.             },
    42.             "m_InputSlot": {
    43.                 "m_Node": {
    44.                     "m_Id": "5f4c442016b94c9f82d4a77060003aea"
    45.                 },
    46.                 "m_SlotId": 1
    47.             }
    48.         },
    49.         {
    50.             "m_OutputSlot": {
    51.                 "m_Node": {
    52.                     "m_Id": "5f4c442016b94c9f82d4a77060003aea"
    53.                 },
    54.                 "m_SlotId": 2
    55.             },
    56.             "m_InputSlot": {
    57.                 "m_Node": {
    58.                     "m_Id": "1ecea7ee2b624ead906365fc37a28f5c"
    59.                 },
    60.                 "m_SlotId": 1
    61.             }
    62.         },
    63.         {
    64.             "m_OutputSlot": {
    65.                 "m_Node": {
    66.                     "m_Id": "990d19061f3545b8b8c69360d196c169"
    67.                 },
    68.                 "m_SlotId": 0
    69.             },
    70.             "m_InputSlot": {
    71.                 "m_Node": {
    72.                     "m_Id": "1ecea7ee2b624ead906365fc37a28f5c"
    73.                 },
    74.                 "m_SlotId": 0
    75.             }
    76.         },
    77.         {
    78.             "m_OutputSlot": {
    79.                 "m_Node": {
    80.                     "m_Id": "1ecea7ee2b624ead906365fc37a28f5c"
    81.                 },
    82.                 "m_SlotId": 2
    83.             },
    84.             "m_InputSlot": {
    85.                 "m_Node": {
    86.                     "m_Id": "05f8e8736fb7435bb408a6ac5200ef9f"
    87.                 },
    88.                 "m_SlotId": 0
    89.             }
    90.         },
    91.         {
    92.             "m_OutputSlot": {
    93.                 "m_Node": {
    94.                     "m_Id": "5660f801c6f347e09650e3ad4ba31fc0"
    95.                 },
    96.                 "m_SlotId": 0
    97.             },
    98.             "m_InputSlot": {
    99.                 "m_Node": {
    100.                     "m_Id": "004025d35e1a41c2a2e979cb372a4737"
    101.                 },
    102.                 "m_SlotId": 1
    103.             }
    104.         }
    105.     ],
    106.     "m_Nodes": [
    107.         {
    108.             "m_Id": "cc0ffeb8d5044ff88c497033e900d5f0"
    109.         },
    110.         {
    111.             "m_Id": "f79922cb9a9a4383acfb582b430760f7"
    112.         },
    113.         {
    114.             "m_Id": "5f4c442016b94c9f82d4a77060003aea"
    115.         },
    116.         {
    117.             "m_Id": "6c64134966644bc2a266968b562da4b2"
    118.         },
    119.         {
    120.             "m_Id": "990d19061f3545b8b8c69360d196c169"
    121.         },
    122.         {
    123.             "m_Id": "1ecea7ee2b624ead906365fc37a28f5c"
    124.         },
    125.         {
    126.             "m_Id": "05f8e8736fb7435bb408a6ac5200ef9f"
    127.         },
    128.         {
    129.             "m_Id": "004025d35e1a41c2a2e979cb372a4737"
    130.         },
    131.         {
    132.             "m_Id": "5660f801c6f347e09650e3ad4ba31fc0"
    133.         }
    134.     ],
    135.     "m_Groups": [],
    136.     "m_StickyNotes": [],
    137.     "m_Inputs": [],
    138.     "m_MetaProperties": [
    139.         {
    140.             "m_Id": "201a9e663599467794194408b8cec128"
    141.         },
    142.         {
    143.             "m_Id": "28d633aa125c47629c5e22fa5ed0b396"
    144.         }
    145.     ],
    146.     "m_MetaPropertyIds": [
    147.         "201a9e663599467794194408b8cec128",
    148.         "28d633aa125c47629c5e22fa5ed0b396"
    149.     ],
    150.     "m_MetaKeywords": [],
    151.     "m_MetaKeywordIds": []
    152. }
    153.  
    154. {
    155.     "m_SGVersion": 0,
    156.     "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode",
    157.     "m_ObjectId": "004025d35e1a41c2a2e979cb372a4737",
    158.     "m_Group": {
    159.         "m_Id": ""
    160.     },
    161.     "m_Name": "Sample Texture 2D",
    162.     "m_DrawState": {
    163.         "m_Expanded": true,
    164.         "m_Position": {
    165.             "serializedVersion": "2",
    166.             "x": -55.999961853027347,
    167.             "y": 406.0,
    168.             "width": 208.0,
    169.             "height": 436.9999694824219
    170.         }
    171.     },
    172.     "m_Slots": [
    173.         {
    174.             "m_Id": "7677f6b4e95746098dfc955b81551896"
    175.         },
    176.         {
    177.             "m_Id": "a134e220ea5448ed837a0278b3bb6cfe"
    178.         },
    179.         {
    180.             "m_Id": "4ae77bb37f984674a6a5a90685018e8d"
    181.         },
    182.         {
    183.             "m_Id": "260b49d1dea2424199a0d67a237d4ecc"
    184.         },
    185.         {
    186.             "m_Id": "b41b7c5e1fa445df93045419f3848d51"
    187.         },
    188.         {
    189.             "m_Id": "8d746462fbc748fba8ad9a902d075204"
    190.         },
    191.         {
    192.             "m_Id": "3771b2e2911c413da0ad91edfde258ff"
    193.         },
    194.         {
    195.             "m_Id": "9b4d133ef8364b8eb148f2bb047979a5"
    196.         }
    197.     ],
    198.     "synonyms": [],
    199.     "m_Precision": 0,
    200.     "m_PreviewExpanded": false,
    201.     "m_PreviewMode": 0,
    202.     "m_CustomColors": {
    203.         "m_SerializableColors": []
    204.     },
    205.     "m_TextureType": 0,
    206.     "m_NormalMapSpace": 0
    207. }
    208.  
    209. {
    210.     "m_SGVersion": 0,
    211.     "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
    212.     "m_ObjectId": "006c3956c3644a72913437f133f5a804",
    213.     "m_Id": 0,
    214.     "m_DisplayName": "A",
    215.     "m_SlotType": 0,
    216.     "m_Hidden": false,
    217.     "m_ShaderOutputName": "A",
    218.     "m_StageCapability": 3,
    219.     "m_Value": {
    220.         "e00": 0.0,
    221.         "e01": 0.0,
    222.         "e02": 0.0,
    223.         "e03": 0.0,
    224.         "e10": 0.0,
    225.         "e11": 0.0,
    226.         "e12": 0.0,
    227.         "e13": 0.0,
    228.         "e20": 0.0,
    229.         "e21": 0.0,
    230.         "e22": 0.0,
    231.         "e23": 0.0,
    232.         "e30": 0.0,
    233.         "e31": 0.0,
    234.         "e32": 0.0,
    235.         "e33": 0.0
    236.     },
    237.     "m_DefaultValue": {
    238.         "e00": 1.0,
    239.         "e01": 0.0,
    240.         "e02": 0.0,
    241.         "e03": 0.0,
    242.         "e10": 0.0,
    243.         "e11": 1.0,
    244.         "e12": 0.0,
    245.         "e13": 0.0,
    246.         "e20": 0.0,
    247.         "e21": 0.0,
    248.         "e22": 1.0,
    249.         "e23": 0.0,
    250.         "e30": 0.0,
    251.         "e31": 0.0,
    252.         "e32": 0.0,
    253.         "e33": 1.0
    254.     }
    255. }
    256.  
    257. {
    258.     "m_SGVersion": 0,
    259.     "m_Type": "UnityEditor.ShaderGraph.TransformNode",
    260.     "m_ObjectId": "05f8e8736fb7435bb408a6ac5200ef9f",
    261.     "m_Group": {
    262.         "m_Id": ""
    263.     },
    264.     "m_Name": "Transform",
    265.     "m_DrawState": {
    266.         "m_Expanded": true,
    267.         "m_Position": {
    268.             "serializedVersion": "2",
    269.             "x": -56.00004577636719,
    270.             "y": -14.999975204467774,
    271.             "width": 213.0,
    272.             "height": 343.0
    273.         }
    274.     },
    275.     "m_Slots": [
    276.         {
    277.             "m_Id": "1c07b116f2b949d093880137cd7e4551"
    278.         },
    279.         {
    280.             "m_Id": "0cb0177fdc1844e8ac6c62bd29252418"
    281.         }
    282.     ],
    283.     "synonyms": [],
    284.     "m_Precision": 0,
    285.     "m_PreviewExpanded": false,
    286.     "m_PreviewMode": 0,
    287.     "m_CustomColors": {
    288.         "m_SerializableColors": []
    289.     },
    290.     "m_Conversion": {
    291.         "from": 1,
    292.         "to": 0
    293.     },
    294.     "m_ConversionType": 0
    295. }
    296.  
    297. {
    298.     "m_SGVersion": 0,
    299.     "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
    300.     "m_ObjectId": "0cb0177fdc1844e8ac6c62bd29252418",
    301.     "m_Id": 1,
    302.     "m_DisplayName": "Out",
    303.     "m_SlotType": 1,
    304.     "m_Hidden": false,
    305.     "m_ShaderOutputName": "Out",
    306.     "m_StageCapability": 3,
    307.     "m_Value": {
    308.         "x": 0.0,
    309.         "y": 0.0,
    310.         "z": 0.0
    311.     },
    312.     "m_DefaultValue": {
    313.         "x": 0.0,
    314.         "y": 0.0,
    315.         "z": 0.0
    316.     },
    317.     "m_Labels": []
    318. }
    319.  
    320. {
    321.     "m_SGVersion": 0,
    322.     "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot",
    323.     "m_ObjectId": "0fd05b0178b342638d43bccb245f90dc",
    324.     "m_Id": 0,
    325.     "m_DisplayName": "Texture2D",
    326.     "m_SlotType": 1,
    327.     "m_Hidden": false,
    328.     "m_ShaderOutputName": "Out",
    329.     "m_StageCapability": 3,
    330.     "m_BareResource": false
    331. }
    332.  
    333. {
    334.     "m_SGVersion": 0,
    335.     "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
    336.     "m_ObjectId": "1c07b116f2b949d093880137cd7e4551",
    337.     "m_Id": 0,
    338.     "m_DisplayName": "In",
    339.     "m_SlotType": 0,
    340.     "m_Hidden": false,
    341.     "m_ShaderOutputName": "In",
    342.     "m_StageCapability": 3,
    343.     "m_Value": {
    344.         "x": 0.0,
    345.         "y": 0.0,
    346.         "z": 0.0
    347.     },
    348.     "m_DefaultValue": {
    349.         "x": 0.0,
    350.         "y": 0.0,
    351.         "z": 0.0
    352.     },
    353.     "m_Labels": []
    354. }
    355.  
    356. {
    357.     "m_SGVersion": 0,
    358.     "m_Type": "UnityEditor.ShaderGraph.AddNode",
    359.     "m_ObjectId": "1ecea7ee2b624ead906365fc37a28f5c",
    360.     "m_Group": {
    361.         "m_Id": ""
    362.     },
    363.     "m_Name": "Add",
    364.     "m_DrawState": {
    365.         "m_Expanded": true,
    366.         "m_Position": {
    367.             "serializedVersion": "2",
    368.             "x": -335.0000305175781,
    369.             "y": -80.0,
    370.             "width": 208.0,
    371.             "height": 302.0
    372.         }
    373.     },
    374.     "m_Slots": [
    375.         {
    376.             "m_Id": "d8fc9804e180479082a7bab9a9cb9943"
    377.         },
    378.         {
    379.             "m_Id": "629a4df6587f4edba19add9afc38e5a8"
    380.         },
    381.         {
    382.             "m_Id": "afa23d04dc6f46a3a0783ccc39a895f8"
    383.         }
    384.     ],
    385.     "synonyms": [],
    386.     "m_Precision": 0,
    387.     "m_PreviewExpanded": false,
    388.     "m_PreviewMode": 0,
    389.     "m_CustomColors": {
    390.         "m_SerializableColors": []
    391.     }
    392. }
    393.  
    394. {
    395.     "m_SGVersion": 1,
    396.     "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
    397.     "m_ObjectId": "201a9e663599467794194408b8cec128",
    398.     "m_Guid": {
    399.         "m_GuidSerialized": "6d4c6a14-20fc-4307-8422-7f44087ce5ff"
    400.     },
    401.     "m_Name": "Scale",
    402.     "m_DefaultReferenceName": "Vector1_201a9e663599467794194408b8cec128",
    403.     "m_OverrideReferenceName": "",
    404.     "m_GeneratePropertyBlock": true,
    405.     "m_Precision": 0,
    406.     "overrideHLSLDeclaration": false,
    407.     "hlslDeclarationOverride": 0,
    408.     "m_Hidden": false,
    409.     "m_Value": 1.0,
    410.     "m_FloatType": 0,
    411.     "m_RangeValues": {
    412.         "x": 0.0,
    413.         "y": 1.0
    414.     }
    415. }
    416.  
    417. {
    418.     "m_SGVersion": 0,
    419.     "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
    420.     "m_ObjectId": "260b49d1dea2424199a0d67a237d4ecc",
    421.     "m_Id": 6,
    422.     "m_DisplayName": "B",
    423.     "m_SlotType": 1,
    424.     "m_Hidden": false,
    425.     "m_ShaderOutputName": "B",
    426.     "m_StageCapability": 2,
    427.     "m_Value": 0.0,
    428.     "m_DefaultValue": 0.0,
    429.     "m_Labels": []
    430. }
    431.  
    432. {
    433.     "m_SGVersion": 0,
    434.     "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty",
    435.     "m_ObjectId": "28d633aa125c47629c5e22fa5ed0b396",
    436.     "m_Guid": {
    437.         "m_GuidSerialized": "99b3b33f-8c50-4995-88f6-589b6cbcff12"
    438.     },
    439.     "m_Name": "Texture2D",
    440.     "m_DefaultReferenceName": "Texture2D_28d633aa125c47629c5e22fa5ed0b396",
    441.     "m_OverrideReferenceName": "_MainTex",
    442.     "m_GeneratePropertyBlock": true,
    443.     "m_Precision": 0,
    444.     "overrideHLSLDeclaration": false,
    445.     "hlslDeclarationOverride": 0,
    446.     "m_Hidden": false,
    447.     "m_Value": {
    448.         "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
    449.         "m_Guid": ""
    450.     },
    451.     "m_Modifiable": true,
    452.     "m_DefaultType": 0
    453. }
    454.  
    455. {
    456.     "m_SGVersion": 0,
    457.     "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot",
    458.     "m_ObjectId": "3771b2e2911c413da0ad91edfde258ff",
    459.     "m_Id": 2,
    460.     "m_DisplayName": "UV",
    461.     "m_SlotType": 0,
    462.     "m_Hidden": false,
    463.     "m_ShaderOutputName": "UV",
    464.     "m_StageCapability": 3,
    465.     "m_Value": {
    466.         "x": 0.0,
    467.         "y": 0.0
    468.     },
    469.     "m_DefaultValue": {
    470.         "x": 0.0,
    471.         "y": 0.0
    472.     },
    473.     "m_Labels": [],
    474.     "m_Channel": 0
    475. }
    476.  
    477. {
    478.     "m_SGVersion": 0,
    479.     "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
    480.     "m_ObjectId": "41c47294be1841cdb49174d9a48dd449",
    481.     "m_Id": 0,
    482.     "m_DisplayName": "Out",
    483.     "m_SlotType": 1,
    484.     "m_Hidden": false,
    485.     "m_ShaderOutputName": "Out",
    486.     "m_StageCapability": 3,
    487.     "m_Value": {
    488.         "x": 0.0,
    489.         "y": 0.0,
    490.         "z": 0.0
    491.     },
    492.     "m_DefaultValue": {
    493.         "x": 0.0,
    494.         "y": 0.0,
    495.         "z": 0.0
    496.     },
    497.     "m_Labels": []
    498. }
    499.  
    500. {
    501.     "m_SGVersion": 0,
    502.     "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
    503.     "m_ObjectId": "4ae77bb37f984674a6a5a90685018e8d",
    504.     "m_Id": 5,
    505.     "m_DisplayName": "G",
    506.     "m_SlotType": 1,
    507.     "m_Hidden": false,
    508.     "m_ShaderOutputName": "G",
    509.     "m_StageCapability": 2,
    510.     "m_Value": 0.0,
    511.     "m_DefaultValue": 0.0,
    512.     "m_Labels": []
    513. }
    514.  
    515. {
    516.     "m_SGVersion": 0,
    517.     "m_Type": "UnityEditor.ShaderGraph.PropertyNode",
    518.     "m_ObjectId": "5660f801c6f347e09650e3ad4ba31fc0",
    519.     "m_Group": {
    520.         "m_Id": ""
    521.     },
    522.     "m_Name": "Property",
    523.     "m_DrawState": {
    524.         "m_Expanded": true,
    525.         "m_Position": {
    526.             "serializedVersion": "2",
    527.             "x": -273.9999694824219,
    528.             "y": 442.0000305175781,
    529.             "width": 139.0,
    530.             "height": 34.0
    531.         }
    532.     },
    533.     "m_Slots": [
    534.         {
    535.             "m_Id": "0fd05b0178b342638d43bccb245f90dc"
    536.         }
    537.     ],
    538.     "synonyms": [],
    539.     "m_Precision": 0,
    540.     "m_PreviewExpanded": true,
    541.     "m_PreviewMode": 0,
    542.     "m_CustomColors": {
    543.         "m_SerializableColors": []
    544.     },
    545.     "m_Property": {
    546.         "m_Id": "28d633aa125c47629c5e22fa5ed0b396"
    547.     }
    548. }
    549.  
    550. {
    551.     "m_SGVersion": 0,
    552.     "m_Type": "UnityEditor.ShaderGraph.MultiplyNode",
    553.     "m_ObjectId": "5f4c442016b94c9f82d4a77060003aea",
    554.     "m_Group": {
    555.         "m_Id": ""
    556.     },
    557.     "m_Name": "Multiply",
    558.     "m_DrawState": {
    559.         "m_Expanded": true,
    560.         "m_Position": {
    561.             "serializedVersion": "2",
    562.             "x": -679.0,
    563.             "y": 0.0,
    564.             "width": 208.0,
    565.             "height": 302.0
    566.         }
    567.     },
    568.     "m_Slots": [
    569.         {
    570.             "m_Id": "006c3956c3644a72913437f133f5a804"
    571.         },
    572.         {
    573.             "m_Id": "d0afee5f8b7940c09b4f23a97a87e14d"
    574.         },
    575.         {
    576.             "m_Id": "d52e748913c9428091b9f8bfc6b3c7dd"
    577.         }
    578.     ],
    579.     "synonyms": [],
    580.     "m_Precision": 0,
    581.     "m_PreviewExpanded": false,
    582.     "m_PreviewMode": 0,
    583.     "m_CustomColors": {
    584.         "m_SerializableColors": []
    585.     }
    586. }
    587.  
    588. {
    589.     "m_SGVersion": 0,
    590.     "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
    591.     "m_ObjectId": "629a4df6587f4edba19add9afc38e5a8",
    592.     "m_Id": 1,
    593.     "m_DisplayName": "B",
    594.     "m_SlotType": 0,
    595.     "m_Hidden": false,
    596.     "m_ShaderOutputName": "B",
    597.     "m_StageCapability": 3,
    598.     "m_Value": {
    599.         "x": 0.0,
    600.         "y": 0.0,
    601.         "z": 0.0,
    602.         "w": 0.0
    603.     },
    604.     "m_DefaultValue": {
    605.         "x": 0.0,
    606.         "y": 0.0,
    607.         "z": 0.0,
    608.         "w": 0.0
    609.     }
    610. }
    611.  
    612. {
    613.     "m_SGVersion": 0,
    614.     "m_Type": "UnityEditor.ShaderGraph.PropertyNode",
    615.     "m_ObjectId": "6c64134966644bc2a266968b562da4b2",
    616.     "m_Group": {
    617.         "m_Id": ""
    618.     },
    619.     "m_Name": "Property",
    620.     "m_DrawState": {
    621.         "m_Expanded": true,
    622.         "m_Position": {
    623.             "serializedVersion": "2",
    624.             "x": -814.0,
    625.             "y": 89.0,
    626.             "width": 104.0,
    627.             "height": 34.0
    628.         }
    629.     },
    630.     "m_Slots": [
    631.         {
    632.             "m_Id": "975930bb3f434d238b436787ee56d39e"
    633.         }
    634.     ],
    635.     "synonyms": [],
    636.     "m_Precision": 0,
    637.     "m_PreviewExpanded": true,
    638.     "m_PreviewMode": 0,
    639.     "m_CustomColors": {
    640.         "m_SerializableColors": []
    641.     },
    642.     "m_Property": {
    643.         "m_Id": "201a9e663599467794194408b8cec128"
    644.     }
    645. }
    646.  
    647. {
    648.     "m_SGVersion": 0,
    649.     "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
    650.     "m_ObjectId": "74b58eac7a5b42a8ad9b38c7fda67511",
    651.     "m_Id": 2,
    652.     "m_DisplayName": "Out",
    653.     "m_SlotType": 1,
    654.     "m_Hidden": false,
    655.     "m_ShaderOutputName": "Out",
    656.     "m_StageCapability": 3,
    657.     "m_Value": {
    658.         "x": 0.0,
    659.         "y": 0.0,
    660.         "z": 0.0,
    661.         "w": 0.0
    662.     },
    663.     "m_DefaultValue": {
    664.         "x": 0.0,
    665.         "y": 0.0,
    666.         "z": 0.0,
    667.         "w": 0.0
    668.     }
    669. }
    670.  
    671. {
    672.     "m_SGVersion": 0,
    673.     "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
    674.     "m_ObjectId": "7677f6b4e95746098dfc955b81551896",
    675.     "m_Id": 0,
    676.     "m_DisplayName": "RGBA",
    677.     "m_SlotType": 1,
    678.     "m_Hidden": false,
    679.     "m_ShaderOutputName": "RGBA",
    680.     "m_StageCapability": 2,
    681.     "m_Value": {
    682.         "x": 0.0,
    683.         "y": 0.0,
    684.         "z": 0.0,
    685.         "w": 0.0
    686.     },
    687.     "m_DefaultValue": {
    688.         "x": 0.0,
    689.         "y": 0.0,
    690.         "z": 0.0,
    691.         "w": 0.0
    692.     },
    693.     "m_Labels": []
    694. }
    695.  
    696. {
    697.     "m_SGVersion": 0,
    698.     "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
    699.     "m_ObjectId": "8a6aca5aaf6b4283b0bdf1e07206686f",
    700.     "m_Id": 1,
    701.     "m_DisplayName": "B",
    702.     "m_SlotType": 0,
    703.     "m_Hidden": false,
    704.     "m_ShaderOutputName": "B",
    705.     "m_StageCapability": 3,
    706.     "m_Value": {
    707.         "x": 0.5,
    708.         "y": 0.5,
    709.         "z": 0.0,
    710.         "w": 1.0
    711.     },
    712.     "m_DefaultValue": {
    713.         "x": 0.0,
    714.         "y": 0.0,
    715.         "z": 0.0,
    716.         "w": 0.0
    717.     }
    718. }
    719.  
    720. {
    721.     "m_SGVersion": 0,
    722.     "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot",
    723.     "m_ObjectId": "8d746462fbc748fba8ad9a902d075204",
    724.     "m_Id": 1,
    725.     "m_DisplayName": "Texture",
    726.     "m_SlotType": 0,
    727.     "m_Hidden": false,
    728.     "m_ShaderOutputName": "Texture",
    729.     "m_StageCapability": 3,
    730.     "m_BareResource": false,
    731.     "m_Texture": {
    732.         "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
    733.         "m_Guid": ""
    734.     },
    735.     "m_DefaultType": 0
    736. }
    737.  
    738. {
    739.     "m_SGVersion": 0,
    740.     "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
    741.     "m_ObjectId": "975930bb3f434d238b436787ee56d39e",
    742.     "m_Id": 0,
    743.     "m_DisplayName": "Scale",
    744.     "m_SlotType": 1,
    745.     "m_Hidden": false,
    746.     "m_ShaderOutputName": "Out",
    747.     "m_StageCapability": 3,
    748.     "m_Value": 0.0,
    749.     "m_DefaultValue": 0.0,
    750.     "m_Labels": []
    751. }
    752.  
    753. {
    754.     "m_SGVersion": 0,
    755.     "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
    756.     "m_ObjectId": "97cbbd185aa146dbb795cbf697303c60",
    757.     "m_Id": 0,
    758.     "m_DisplayName": "A",
    759.     "m_SlotType": 0,
    760.     "m_Hidden": false,
    761.     "m_ShaderOutputName": "A",
    762.     "m_StageCapability": 3,
    763.     "m_Value": {
    764.         "x": 1.0,
    765.         "y": 1.0,
    766.         "z": 1.0,
    767.         "w": 1.0
    768.     },
    769.     "m_DefaultValue": {
    770.         "x": 0.0,
    771.         "y": 0.0,
    772.         "z": 0.0,
    773.         "w": 0.0
    774.     }
    775. }
    776.  
    777. {
    778.     "m_SGVersion": 1,
    779.     "m_Type": "UnityEditor.ShaderGraph.PositionNode",
    780.     "m_ObjectId": "990d19061f3545b8b8c69360d196c169",
    781.     "m_Group": {
    782.         "m_Id": ""
    783.     },
    784.     "m_Name": "Position",
    785.     "m_DrawState": {
    786.         "m_Expanded": true,
    787.         "m_Position": {
    788.             "serializedVersion": "2",
    789.             "x": -619.0000610351563,
    790.             "y": -242.0,
    791.             "width": 206.0,
    792.             "height": 132.0
    793.         }
    794.     },
    795.     "m_Slots": [
    796.         {
    797.             "m_Id": "41c47294be1841cdb49174d9a48dd449"
    798.         }
    799.     ],
    800.     "synonyms": [],
    801.     "m_Precision": 1,
    802.     "m_PreviewExpanded": false,
    803.     "m_PreviewMode": 2,
    804.     "m_CustomColors": {
    805.         "m_SerializableColors": []
    806.     },
    807.     "m_Space": 1
    808. }
    809.  
    810. {
    811.     "m_SGVersion": 0,
    812.     "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot",
    813.     "m_ObjectId": "9b4d133ef8364b8eb148f2bb047979a5",
    814.     "m_Id": 3,
    815.     "m_DisplayName": "Sampler",
    816.     "m_SlotType": 0,
    817.     "m_Hidden": false,
    818.     "m_ShaderOutputName": "Sampler",
    819.     "m_StageCapability": 3,
    820.     "m_BareResource": false
    821. }
    822.  
    823. {
    824.     "m_SGVersion": 0,
    825.     "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
    826.     "m_ObjectId": "9f22df305def46e18ef93cc6369f560b",
    827.     "m_Id": 0,
    828.     "m_DisplayName": "Out",
    829.     "m_SlotType": 1,
    830.     "m_Hidden": false,
    831.     "m_ShaderOutputName": "Out",
    832.     "m_StageCapability": 3,
    833.     "m_Value": {
    834.         "x": 0.0,
    835.         "y": 0.0,
    836.         "z": 0.0,
    837.         "w": 0.0
    838.     },
    839.     "m_DefaultValue": {
    840.         "x": 0.0,
    841.         "y": 0.0,
    842.         "z": 0.0,
    843.         "w": 0.0
    844.     },
    845.     "m_Labels": []
    846. }
    847.  
    848. {
    849.     "m_SGVersion": 0,
    850.     "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
    851.     "m_ObjectId": "a134e220ea5448ed837a0278b3bb6cfe",
    852.     "m_Id": 4,
    853.     "m_DisplayName": "R",
    854.     "m_SlotType": 1,
    855.     "m_Hidden": false,
    856.     "m_ShaderOutputName": "R",
    857.     "m_StageCapability": 2,
    858.     "m_Value": 0.0,
    859.     "m_DefaultValue": 0.0,
    860.     "m_Labels": []
    861. }
    862.  
    863. {
    864.     "m_SGVersion": 0,
    865.     "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
    866.     "m_ObjectId": "afa23d04dc6f46a3a0783ccc39a895f8",
    867.     "m_Id": 2,
    868.     "m_DisplayName": "Out",
    869.     "m_SlotType": 1,
    870.     "m_Hidden": false,
    871.     "m_ShaderOutputName": "Out",
    872.     "m_StageCapability": 3,
    873.     "m_Value": {
    874.         "x": 0.0,
    875.         "y": 0.0,
    876.         "z": 0.0,
    877.         "w": 0.0
    878.     },
    879.     "m_DefaultValue": {
    880.         "x": 0.0,
    881.         "y": 0.0,
    882.         "z": 0.0,
    883.         "w": 0.0
    884.     }
    885. }
    886.  
    887. {
    888.     "m_SGVersion": 0,
    889.     "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
    890.     "m_ObjectId": "b41b7c5e1fa445df93045419f3848d51",
    891.     "m_Id": 7,
    892.     "m_DisplayName": "A",
    893.     "m_SlotType": 1,
    894.     "m_Hidden": false,
    895.     "m_ShaderOutputName": "A",
    896.     "m_StageCapability": 2,
    897.     "m_Value": 0.0,
    898.     "m_DefaultValue": 0.0,
    899.     "m_Labels": []
    900. }
    901.  
    902. {
    903.     "m_SGVersion": 0,
    904.     "m_Type": "UnityEditor.ShaderGraph.UVNode",
    905.     "m_ObjectId": "cc0ffeb8d5044ff88c497033e900d5f0",
    906.     "m_Group": {
    907.         "m_Id": ""
    908.     },
    909.     "m_Name": "UV",
    910.     "m_DrawState": {
    911.         "m_Expanded": true,
    912.         "m_Position": {
    913.             "serializedVersion": "2",
    914.             "x": -1171.0,
    915.             "y": -130.0,
    916.             "width": 145.0,
    917.             "height": 130.0
    918.         }
    919.     },
    920.     "m_Slots": [
    921.         {
    922.             "m_Id": "9f22df305def46e18ef93cc6369f560b"
    923.         }
    924.     ],
    925.     "synonyms": [],
    926.     "m_Precision": 0,
    927.     "m_PreviewExpanded": false,
    928.     "m_PreviewMode": 0,
    929.     "m_CustomColors": {
    930.         "m_SerializableColors": []
    931.     },
    932.     "m_OutputChannel": 0
    933. }
    934.  
    935. {
    936.     "m_SGVersion": 0,
    937.     "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
    938.     "m_ObjectId": "d0afee5f8b7940c09b4f23a97a87e14d",
    939.     "m_Id": 1,
    940.     "m_DisplayName": "B",
    941.     "m_SlotType": 0,
    942.     "m_Hidden": false,
    943.     "m_ShaderOutputName": "B",
    944.     "m_StageCapability": 3,
    945.     "m_Value": {
    946.         "e00": 2.0,
    947.         "e01": 2.0,
    948.         "e02": 2.0,
    949.         "e03": 2.0,
    950.         "e10": 2.0,
    951.         "e11": 2.0,
    952.         "e12": 2.0,
    953.         "e13": 2.0,
    954.         "e20": 2.0,
    955.         "e21": 2.0,
    956.         "e22": 2.0,
    957.         "e23": 2.0,
    958.         "e30": 2.0,
    959.         "e31": 2.0,
    960.         "e32": 2.0,
    961.         "e33": 2.0
    962.     },
    963.     "m_DefaultValue": {
    964.         "e00": 1.0,
    965.         "e01": 0.0,
    966.         "e02": 0.0,
    967.         "e03": 0.0,
    968.         "e10": 0.0,
    969.         "e11": 1.0,
    970.         "e12": 0.0,
    971.         "e13": 0.0,
    972.         "e20": 0.0,
    973.         "e21": 0.0,
    974.         "e22": 1.0,
    975.         "e23": 0.0,
    976.         "e30": 0.0,
    977.         "e31": 0.0,
    978.         "e32": 0.0,
    979.         "e33": 1.0
    980.     }
    981. }
    982.  
    983. {
    984.     "m_SGVersion": 0,
    985.     "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
    986.     "m_ObjectId": "d52e748913c9428091b9f8bfc6b3c7dd",
    987.     "m_Id": 2,
    988.     "m_DisplayName": "Out",
    989.     "m_SlotType": 1,
    990.     "m_Hidden": false,
    991.     "m_ShaderOutputName": "Out",
    992.     "m_StageCapability": 3,
    993.     "m_Value": {
    994.         "e00": 0.0,
    995.         "e01": 0.0,
    996.         "e02": 0.0,
    997.         "e03": 0.0,
    998.         "e10": 0.0,
    999.         "e11": 0.0,
    1000.         "e12": 0.0,
    1001.         "e13": 0.0,
    1002.         "e20": 0.0,
    1003.         "e21": 0.0,
    1004.         "e22": 0.0,
    1005.         "e23": 0.0,
    1006.         "e30": 0.0,
    1007.         "e31": 0.0,
    1008.         "e32": 0.0,
    1009.         "e33": 0.0
    1010.     },
    1011.     "m_DefaultValue": {
    1012.         "e00": 1.0,
    1013.         "e01": 0.0,
    1014.         "e02": 0.0,
    1015.         "e03": 0.0,
    1016.         "e10": 0.0,
    1017.         "e11": 1.0,
    1018.         "e12": 0.0,
    1019.         "e13": 0.0,
    1020.         "e20": 0.0,
    1021.         "e21": 0.0,
    1022.         "e22": 1.0,
    1023.         "e23": 0.0,
    1024.         "e30": 0.0,
    1025.         "e31": 0.0,
    1026.         "e32": 0.0,
    1027.         "e33": 1.0
    1028.     }
    1029. }
    1030.  
    1031. {
    1032.     "m_SGVersion": 0,
    1033.     "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
    1034.     "m_ObjectId": "d8fc9804e180479082a7bab9a9cb9943",
    1035.     "m_Id": 0,
    1036.     "m_DisplayName": "A",
    1037.     "m_SlotType": 0,
    1038.     "m_Hidden": false,
    1039.     "m_ShaderOutputName": "A",
    1040.     "m_StageCapability": 3,
    1041.     "m_Value": {
    1042.         "x": 0.0,
    1043.         "y": 0.0,
    1044.         "z": 0.0,
    1045.         "w": 0.0
    1046.     },
    1047.     "m_DefaultValue": {
    1048.         "x": 0.0,
    1049.         "y": 0.0,
    1050.         "z": 0.0,
    1051.         "w": 0.0
    1052.     }
    1053. }
    1054.  
    1055. {
    1056.     "m_SGVersion": 0,
    1057.     "m_Type": "UnityEditor.ShaderGraph.SubtractNode",
    1058.     "m_ObjectId": "f79922cb9a9a4383acfb582b430760f7",
    1059.     "m_Group": {
    1060.         "m_Id": ""
    1061.     },
    1062.     "m_Name": "Subtract",
    1063.     "m_DrawState": {
    1064.         "m_Expanded": true,
    1065.         "m_Position": {
    1066.             "serializedVersion": "2",
    1067.             "x": -954.0,
    1068.             "y": -47.0,
    1069.             "width": 208.0,
    1070.             "height": 302.0
    1071.         }
    1072.     },
    1073.     "m_Slots": [
    1074.         {
    1075.             "m_Id": "97cbbd185aa146dbb795cbf697303c60"
    1076.         },
    1077.         {
    1078.             "m_Id": "8a6aca5aaf6b4283b0bdf1e07206686f"
    1079.         },
    1080.         {
    1081.             "m_Id": "74b58eac7a5b42a8ad9b38c7fda67511"
    1082.         }
    1083.     ],
    1084.     "synonyms": [],
    1085.     "m_Precision": 0,
    1086.     "m_PreviewExpanded": false,
    1087.     "m_PreviewMode": 0,
    1088.     "m_CustomColors": {
    1089.         "m_SerializableColors": []
    1090.     }
    1091. }