Unlit Billboard Shader (Universal RP)

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: Imgur: The magic of the Internet

See the erratic behavior here:

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.

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.

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.


But it’s seems inapplicable for sprites anyway, do a lack of way to setup uv or any other vertex attribute from api.

1 Like

Here’s a text that anyone can copy/paste in a Shader Graph window to get the nodes set (from @mouurusai reply):

application/vnd.unity.graphview.elements {
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.CopyPasteGraph",
    "m_ObjectId": "a529cd3d5a4d4081a491584ef49e16f6",
    "m_Edges": [
        {
            "m_OutputSlot": {
                "m_Node": {
                    "m_Id": "cc0ffeb8d5044ff88c497033e900d5f0"
                },
                "m_SlotId": 0
            },
            "m_InputSlot": {
                "m_Node": {
                    "m_Id": "f79922cb9a9a4383acfb582b430760f7"
                },
                "m_SlotId": 0
            }
        },
        {
            "m_OutputSlot": {
                "m_Node": {
                    "m_Id": "f79922cb9a9a4383acfb582b430760f7"
                },
                "m_SlotId": 2
            },
            "m_InputSlot": {
                "m_Node": {
                    "m_Id": "5f4c442016b94c9f82d4a77060003aea"
                },
                "m_SlotId": 0
            }
        },
        {
            "m_OutputSlot": {
                "m_Node": {
                    "m_Id": "6c64134966644bc2a266968b562da4b2"
                },
                "m_SlotId": 0
            },
            "m_InputSlot": {
                "m_Node": {
                    "m_Id": "5f4c442016b94c9f82d4a77060003aea"
                },
                "m_SlotId": 1
            }
        },
        {
            "m_OutputSlot": {
                "m_Node": {
                    "m_Id": "5f4c442016b94c9f82d4a77060003aea"
                },
                "m_SlotId": 2
            },
            "m_InputSlot": {
                "m_Node": {
                    "m_Id": "1ecea7ee2b624ead906365fc37a28f5c"
                },
                "m_SlotId": 1
            }
        },
        {
            "m_OutputSlot": {
                "m_Node": {
                    "m_Id": "990d19061f3545b8b8c69360d196c169"
                },
                "m_SlotId": 0
            },
            "m_InputSlot": {
                "m_Node": {
                    "m_Id": "1ecea7ee2b624ead906365fc37a28f5c"
                },
                "m_SlotId": 0
            }
        },
        {
            "m_OutputSlot": {
                "m_Node": {
                    "m_Id": "1ecea7ee2b624ead906365fc37a28f5c"
                },
                "m_SlotId": 2
            },
            "m_InputSlot": {
                "m_Node": {
                    "m_Id": "05f8e8736fb7435bb408a6ac5200ef9f"
                },
                "m_SlotId": 0
            }
        },
        {
            "m_OutputSlot": {
                "m_Node": {
                    "m_Id": "5660f801c6f347e09650e3ad4ba31fc0"
                },
                "m_SlotId": 0
            },
            "m_InputSlot": {
                "m_Node": {
                    "m_Id": "004025d35e1a41c2a2e979cb372a4737"
                },
                "m_SlotId": 1
            }
        }
    ],
    "m_Nodes": [
        {
            "m_Id": "cc0ffeb8d5044ff88c497033e900d5f0"
        },
        {
            "m_Id": "f79922cb9a9a4383acfb582b430760f7"
        },
        {
            "m_Id": "5f4c442016b94c9f82d4a77060003aea"
        },
        {
            "m_Id": "6c64134966644bc2a266968b562da4b2"
        },
        {
            "m_Id": "990d19061f3545b8b8c69360d196c169"
        },
        {
            "m_Id": "1ecea7ee2b624ead906365fc37a28f5c"
        },
        {
            "m_Id": "05f8e8736fb7435bb408a6ac5200ef9f"
        },
        {
            "m_Id": "004025d35e1a41c2a2e979cb372a4737"
        },
        {
            "m_Id": "5660f801c6f347e09650e3ad4ba31fc0"
        }
    ],
    "m_Groups": [],
    "m_StickyNotes": [],
    "m_Inputs": [],
    "m_MetaProperties": [
        {
            "m_Id": "201a9e663599467794194408b8cec128"
        },
        {
            "m_Id": "28d633aa125c47629c5e22fa5ed0b396"
        }
    ],
    "m_MetaPropertyIds": [
        "201a9e663599467794194408b8cec128",
        "28d633aa125c47629c5e22fa5ed0b396"
    ],
    "m_MetaKeywords": [],
    "m_MetaKeywordIds": []
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode",
    "m_ObjectId": "004025d35e1a41c2a2e979cb372a4737",
    "m_Group": {
        "m_Id": ""
    },
    "m_Name": "Sample Texture 2D",
    "m_DrawState": {
        "m_Expanded": true,
        "m_Position": {
            "serializedVersion": "2",
            "x": -55.999961853027347,
            "y": 406.0,
            "width": 208.0,
            "height": 436.9999694824219
        }
    },
    "m_Slots": [
        {
            "m_Id": "7677f6b4e95746098dfc955b81551896"
        },
        {
            "m_Id": "a134e220ea5448ed837a0278b3bb6cfe"
        },
        {
            "m_Id": "4ae77bb37f984674a6a5a90685018e8d"
        },
        {
            "m_Id": "260b49d1dea2424199a0d67a237d4ecc"
        },
        {
            "m_Id": "b41b7c5e1fa445df93045419f3848d51"
        },
        {
            "m_Id": "8d746462fbc748fba8ad9a902d075204"
        },
        {
            "m_Id": "3771b2e2911c413da0ad91edfde258ff"
        },
        {
            "m_Id": "9b4d133ef8364b8eb148f2bb047979a5"
        }
    ],
    "synonyms": [],
    "m_Precision": 0,
    "m_PreviewExpanded": false,
    "m_PreviewMode": 0,
    "m_CustomColors": {
        "m_SerializableColors": []
    },
    "m_TextureType": 0,
    "m_NormalMapSpace": 0
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
    "m_ObjectId": "006c3956c3644a72913437f133f5a804",
    "m_Id": 0,
    "m_DisplayName": "A",
    "m_SlotType": 0,
    "m_Hidden": false,
    "m_ShaderOutputName": "A",
    "m_StageCapability": 3,
    "m_Value": {
        "e00": 0.0,
        "e01": 0.0,
        "e02": 0.0,
        "e03": 0.0,
        "e10": 0.0,
        "e11": 0.0,
        "e12": 0.0,
        "e13": 0.0,
        "e20": 0.0,
        "e21": 0.0,
        "e22": 0.0,
        "e23": 0.0,
        "e30": 0.0,
        "e31": 0.0,
        "e32": 0.0,
        "e33": 0.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.TransformNode",
    "m_ObjectId": "05f8e8736fb7435bb408a6ac5200ef9f",
    "m_Group": {
        "m_Id": ""
    },
    "m_Name": "Transform",
    "m_DrawState": {
        "m_Expanded": true,
        "m_Position": {
            "serializedVersion": "2",
            "x": -56.00004577636719,
            "y": -14.999975204467774,
            "width": 213.0,
            "height": 343.0
        }
    },
    "m_Slots": [
        {
            "m_Id": "1c07b116f2b949d093880137cd7e4551"
        },
        {
            "m_Id": "0cb0177fdc1844e8ac6c62bd29252418"
        }
    ],
    "synonyms": [],
    "m_Precision": 0,
    "m_PreviewExpanded": false,
    "m_PreviewMode": 0,
    "m_CustomColors": {
        "m_SerializableColors": []
    },
    "m_Conversion": {
        "from": 1,
        "to": 0
    },
    "m_ConversionType": 0
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
    "m_ObjectId": "0cb0177fdc1844e8ac6c62bd29252418",
    "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
    },
    "m_DefaultValue": {
        "x": 0.0,
        "y": 0.0,
        "z": 0.0
    },
    "m_Labels": []
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot",
    "m_ObjectId": "0fd05b0178b342638d43bccb245f90dc",
    "m_Id": 0,
    "m_DisplayName": "Texture2D",
    "m_SlotType": 1,
    "m_Hidden": false,
    "m_ShaderOutputName": "Out",
    "m_StageCapability": 3,
    "m_BareResource": false
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
    "m_ObjectId": "1c07b116f2b949d093880137cd7e4551",
    "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
    },
    "m_DefaultValue": {
        "x": 0.0,
        "y": 0.0,
        "z": 0.0
    },
    "m_Labels": []
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.AddNode",
    "m_ObjectId": "1ecea7ee2b624ead906365fc37a28f5c",
    "m_Group": {
        "m_Id": ""
    },
    "m_Name": "Add",
    "m_DrawState": {
        "m_Expanded": true,
        "m_Position": {
            "serializedVersion": "2",
            "x": -335.0000305175781,
            "y": -80.0,
            "width": 208.0,
            "height": 302.0
        }
    },
    "m_Slots": [
        {
            "m_Id": "d8fc9804e180479082a7bab9a9cb9943"
        },
        {
            "m_Id": "629a4df6587f4edba19add9afc38e5a8"
        },
        {
            "m_Id": "afa23d04dc6f46a3a0783ccc39a895f8"
        }
    ],
    "synonyms": [],
    "m_Precision": 0,
    "m_PreviewExpanded": false,
    "m_PreviewMode": 0,
    "m_CustomColors": {
        "m_SerializableColors": []
    }
}

{
    "m_SGVersion": 1,
    "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
    "m_ObjectId": "201a9e663599467794194408b8cec128",
    "m_Guid": {
        "m_GuidSerialized": "6d4c6a14-20fc-4307-8422-7f44087ce5ff"
    },
    "m_Name": "Scale",
    "m_DefaultReferenceName": "Vector1_201a9e663599467794194408b8cec128",
    "m_OverrideReferenceName": "",
    "m_GeneratePropertyBlock": true,
    "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": "260b49d1dea2424199a0d67a237d4ecc",
    "m_Id": 6,
    "m_DisplayName": "B",
    "m_SlotType": 1,
    "m_Hidden": false,
    "m_ShaderOutputName": "B",
    "m_StageCapability": 2,
    "m_Value": 0.0,
    "m_DefaultValue": 0.0,
    "m_Labels": []
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty",
    "m_ObjectId": "28d633aa125c47629c5e22fa5ed0b396",
    "m_Guid": {
        "m_GuidSerialized": "99b3b33f-8c50-4995-88f6-589b6cbcff12"
    },
    "m_Name": "Texture2D",
    "m_DefaultReferenceName": "Texture2D_28d633aa125c47629c5e22fa5ed0b396",
    "m_OverrideReferenceName": "_MainTex",
    "m_GeneratePropertyBlock": true,
    "m_Precision": 0,
    "overrideHLSLDeclaration": false,
    "hlslDeclarationOverride": 0,
    "m_Hidden": false,
    "m_Value": {
        "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
        "m_Guid": ""
    },
    "m_Modifiable": true,
    "m_DefaultType": 0
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot",
    "m_ObjectId": "3771b2e2911c413da0ad91edfde258ff",
    "m_Id": 2,
    "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_Channel": 0
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
    "m_ObjectId": "41c47294be1841cdb49174d9a48dd449",
    "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,
        "z": 0.0
    },
    "m_DefaultValue": {
        "x": 0.0,
        "y": 0.0,
        "z": 0.0
    },
    "m_Labels": []
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
    "m_ObjectId": "4ae77bb37f984674a6a5a90685018e8d",
    "m_Id": 5,
    "m_DisplayName": "G",
    "m_SlotType": 1,
    "m_Hidden": false,
    "m_ShaderOutputName": "G",
    "m_StageCapability": 2,
    "m_Value": 0.0,
    "m_DefaultValue": 0.0,
    "m_Labels": []
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.PropertyNode",
    "m_ObjectId": "5660f801c6f347e09650e3ad4ba31fc0",
    "m_Group": {
        "m_Id": ""
    },
    "m_Name": "Property",
    "m_DrawState": {
        "m_Expanded": true,
        "m_Position": {
            "serializedVersion": "2",
            "x": -273.9999694824219,
            "y": 442.0000305175781,
            "width": 139.0,
            "height": 34.0
        }
    },
    "m_Slots": [
        {
            "m_Id": "0fd05b0178b342638d43bccb245f90dc"
        }
    ],
    "synonyms": [],
    "m_Precision": 0,
    "m_PreviewExpanded": true,
    "m_PreviewMode": 0,
    "m_CustomColors": {
        "m_SerializableColors": []
    },
    "m_Property": {
        "m_Id": "28d633aa125c47629c5e22fa5ed0b396"
    }
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.MultiplyNode",
    "m_ObjectId": "5f4c442016b94c9f82d4a77060003aea",
    "m_Group": {
        "m_Id": ""
    },
    "m_Name": "Multiply",
    "m_DrawState": {
        "m_Expanded": true,
        "m_Position": {
            "serializedVersion": "2",
            "x": -679.0,
            "y": 0.0,
            "width": 208.0,
            "height": 302.0
        }
    },
    "m_Slots": [
        {
            "m_Id": "006c3956c3644a72913437f133f5a804"
        },
        {
            "m_Id": "d0afee5f8b7940c09b4f23a97a87e14d"
        },
        {
            "m_Id": "d52e748913c9428091b9f8bfc6b3c7dd"
        }
    ],
    "synonyms": [],
    "m_Precision": 0,
    "m_PreviewExpanded": false,
    "m_PreviewMode": 0,
    "m_CustomColors": {
        "m_SerializableColors": []
    }
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
    "m_ObjectId": "629a4df6587f4edba19add9afc38e5a8",
    "m_Id": 1,
    "m_DisplayName": "B",
    "m_SlotType": 0,
    "m_Hidden": false,
    "m_ShaderOutputName": "B",
    "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.PropertyNode",
    "m_ObjectId": "6c64134966644bc2a266968b562da4b2",
    "m_Group": {
        "m_Id": ""
    },
    "m_Name": "Property",
    "m_DrawState": {
        "m_Expanded": true,
        "m_Position": {
            "serializedVersion": "2",
            "x": -814.0,
            "y": 89.0,
            "width": 104.0,
            "height": 34.0
        }
    },
    "m_Slots": [
        {
            "m_Id": "975930bb3f434d238b436787ee56d39e"
        }
    ],
    "synonyms": [],
    "m_Precision": 0,
    "m_PreviewExpanded": true,
    "m_PreviewMode": 0,
    "m_CustomColors": {
        "m_SerializableColors": []
    },
    "m_Property": {
        "m_Id": "201a9e663599467794194408b8cec128"
    }
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
    "m_ObjectId": "74b58eac7a5b42a8ad9b38c7fda67511",
    "m_Id": 2,
    "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.Vector4MaterialSlot",
    "m_ObjectId": "7677f6b4e95746098dfc955b81551896",
    "m_Id": 0,
    "m_DisplayName": "RGBA",
    "m_SlotType": 1,
    "m_Hidden": false,
    "m_ShaderOutputName": "RGBA",
    "m_StageCapability": 2,
    "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.DynamicVectorMaterialSlot",
    "m_ObjectId": "8a6aca5aaf6b4283b0bdf1e07206686f",
    "m_Id": 1,
    "m_DisplayName": "B",
    "m_SlotType": 0,
    "m_Hidden": false,
    "m_ShaderOutputName": "B",
    "m_StageCapability": 3,
    "m_Value": {
        "x": 0.5,
        "y": 0.5,
        "z": 0.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.Texture2DInputMaterialSlot",
    "m_ObjectId": "8d746462fbc748fba8ad9a902d075204",
    "m_Id": 1,
    "m_DisplayName": "Texture",
    "m_SlotType": 0,
    "m_Hidden": false,
    "m_ShaderOutputName": "Texture",
    "m_StageCapability": 3,
    "m_BareResource": false,
    "m_Texture": {
        "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}",
        "m_Guid": ""
    },
    "m_DefaultType": 0
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
    "m_ObjectId": "975930bb3f434d238b436787ee56d39e",
    "m_Id": 0,
    "m_DisplayName": "Scale",
    "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.DynamicVectorMaterialSlot",
    "m_ObjectId": "97cbbd185aa146dbb795cbf697303c60",
    "m_Id": 0,
    "m_DisplayName": "A",
    "m_SlotType": 0,
    "m_Hidden": false,
    "m_ShaderOutputName": "A",
    "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": 1,
    "m_Type": "UnityEditor.ShaderGraph.PositionNode",
    "m_ObjectId": "990d19061f3545b8b8c69360d196c169",
    "m_Group": {
        "m_Id": ""
    },
    "m_Name": "Position",
    "m_DrawState": {
        "m_Expanded": true,
        "m_Position": {
            "serializedVersion": "2",
            "x": -619.0000610351563,
            "y": -242.0,
            "width": 206.0,
            "height": 132.0
        }
    },
    "m_Slots": [
        {
            "m_Id": "41c47294be1841cdb49174d9a48dd449"
        }
    ],
    "synonyms": [],
    "m_Precision": 1,
    "m_PreviewExpanded": false,
    "m_PreviewMode": 2,
    "m_CustomColors": {
        "m_SerializableColors": []
    },
    "m_Space": 1
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot",
    "m_ObjectId": "9b4d133ef8364b8eb148f2bb047979a5",
    "m_Id": 3,
    "m_DisplayName": "Sampler",
    "m_SlotType": 0,
    "m_Hidden": false,
    "m_ShaderOutputName": "Sampler",
    "m_StageCapability": 3,
    "m_BareResource": false
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
    "m_ObjectId": "9f22df305def46e18ef93cc6369f560b",
    "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,
        "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": "a134e220ea5448ed837a0278b3bb6cfe",
    "m_Id": 4,
    "m_DisplayName": "R",
    "m_SlotType": 1,
    "m_Hidden": false,
    "m_ShaderOutputName": "R",
    "m_StageCapability": 2,
    "m_Value": 0.0,
    "m_DefaultValue": 0.0,
    "m_Labels": []
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
    "m_ObjectId": "afa23d04dc6f46a3a0783ccc39a895f8",
    "m_Id": 2,
    "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.Vector1MaterialSlot",
    "m_ObjectId": "b41b7c5e1fa445df93045419f3848d51",
    "m_Id": 7,
    "m_DisplayName": "A",
    "m_SlotType": 1,
    "m_Hidden": false,
    "m_ShaderOutputName": "A",
    "m_StageCapability": 2,
    "m_Value": 0.0,
    "m_DefaultValue": 0.0,
    "m_Labels": []
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.UVNode",
    "m_ObjectId": "cc0ffeb8d5044ff88c497033e900d5f0",
    "m_Group": {
        "m_Id": ""
    },
    "m_Name": "UV",
    "m_DrawState": {
        "m_Expanded": true,
        "m_Position": {
            "serializedVersion": "2",
            "x": -1171.0,
            "y": -130.0,
            "width": 145.0,
            "height": 130.0
        }
    },
    "m_Slots": [
        {
            "m_Id": "9f22df305def46e18ef93cc6369f560b"
        }
    ],
    "synonyms": [],
    "m_Precision": 0,
    "m_PreviewExpanded": false,
    "m_PreviewMode": 0,
    "m_CustomColors": {
        "m_SerializableColors": []
    },
    "m_OutputChannel": 0
}

{
    "m_SGVersion": 0,
    "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
    "m_ObjectId": "d0afee5f8b7940c09b4f23a97a87e14d",
    "m_Id": 1,
    "m_DisplayName": "B",
    "m_SlotType": 0,
    "m_Hidden": false,
    "m_ShaderOutputName": "B",
    "m_StageCapability": 3,
    "m_Value": {
        "e00": 2.0,
        "e01": 2.0,
        "e02": 2.0,
        "e03": 2.0,
        "e10": 2.0,
        "e11": 2.0,
        "e12": 2.0,
        "e13": 2.0,
        "e20": 2.0,
        "e21": 2.0,
        "e22": 2.0,
        "e23": 2.0,
        "e30": 2.0,
        "e31": 2.0,
        "e32": 2.0,
        "e33": 2.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.DynamicValueMaterialSlot",
    "m_ObjectId": "d52e748913c9428091b9f8bfc6b3c7dd",
    "m_Id": 2,
    "m_DisplayName": "Out",
    "m_SlotType": 1,
    "m_Hidden": false,
    "m_ShaderOutputName": "Out",
    "m_StageCapability": 3,
    "m_Value": {
        "e00": 0.0,
        "e01": 0.0,
        "e02": 0.0,
        "e03": 0.0,
        "e10": 0.0,
        "e11": 0.0,
        "e12": 0.0,
        "e13": 0.0,
        "e20": 0.0,
        "e21": 0.0,
        "e22": 0.0,
        "e23": 0.0,
        "e30": 0.0,
        "e31": 0.0,
        "e32": 0.0,
        "e33": 0.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.DynamicVectorMaterialSlot",
    "m_ObjectId": "d8fc9804e180479082a7bab9a9cb9943",
    "m_Id": 0,
    "m_DisplayName": "A",
    "m_SlotType": 0,
    "m_Hidden": false,
    "m_ShaderOutputName": "A",
    "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.SubtractNode",
    "m_ObjectId": "f79922cb9a9a4383acfb582b430760f7",
    "m_Group": {
        "m_Id": ""
    },
    "m_Name": "Subtract",
    "m_DrawState": {
        "m_Expanded": true,
        "m_Position": {
            "serializedVersion": "2",
            "x": -954.0,
            "y": -47.0,
            "width": 208.0,
            "height": 302.0
        }
    },
    "m_Slots": [
        {
            "m_Id": "97cbbd185aa146dbb795cbf697303c60"
        },
        {
            "m_Id": "8a6aca5aaf6b4283b0bdf1e07206686f"
        },
        {
            "m_Id": "74b58eac7a5b42a8ad9b38c7fda67511"
        }
    ],
    "synonyms": [],
    "m_Precision": 0,
    "m_PreviewExpanded": false,
    "m_PreviewMode": 0,
    "m_CustomColors": {
        "m_SerializableColors": []
    }
}