#usda 1.0

def "ModelShading" (
    prepend references = @./char_shading_compact.usda@</ShadingDefs>
    variants = {
        string materialVariant = "Wet"
    }
    prepend variantSets = "materialVariant"
)
{
    variantSet "materialVariant" = {
        "Dry" {
            over "Materials"
            {
                over "HairMaterial" (
                    variants = {
                        string materialVariant = "Dry"
                    }
                )
                {
                }

                over "SkinMaterial" (
                    variants = {
                        string materialVariant = "Dry"
                    }
                )
                {
                }

                over "NailsMaterial" (
                    variants = {
                        string materialVariant = "Dry"
                    }
                )
                {
                }
            }

        }
        "Wet" {
            over "Materials"
            {
                over "HairMaterial" (
                    variants = {
                        string materialVariant = "Wet"
                    }
                )
                {
                }

                over "SkinMaterial" (
                    variants = {
                        string materialVariant = "Wet"
                    }
                )
                {
                }

                over "NailsMaterial" (
                    variants = {
                        string materialVariant = "Wet"
                    }
                )
                {
                }
            }

        }
    }
}

def "ShadingDefs"
{
    def Scope "Shaders"
    {
        def Shader "HairWetSurface"
        {
            color3f outputs:out
        }

        def Shader "HairWetDisp"
        {
            vector3f outputs:out
        }

        def Shader "HairWetPattern"
        {
            float[] outputs:out
        }

        def Shader "HairDrySurface"
        {
            color3f outputs:out
        }

        def Shader "HairDryDisp"
        {
            vector3f outputs:out
        }

        def Shader "HairDryPattern"
        {
            float[] outputs:out
        }

        def Shader "SkinWetSurface"
        {
            color3f outputs:out
        }

        def Shader "SkinWetDisp"
        {
            vector3f outputs:out
        }

        def Shader "SkinWetPattern"
        {
            float[] outputs:out
        }

        def Shader "SkinDrySurface"
        {
            color3f outputs:out
        }

        def Shader "SkinDryDisp"
        {
            vector3f outputs:out
        }

        def Shader "SkinDryPattern"
        {
            float[] outputs:out
        }

        def Shader "NailsWetSurface"
        {
            color3f outputs:out
        }

        def Shader "NailsWetDisp"
        {
            vector3f outputs:out
        }

        def Shader "NailsWetPattern"
        {
            float[] outputs:out
        }

        def Shader "NailsDrySurface"
        {
            color3f outputs:out
        }

        def Shader "NailsDryDisp"
        {
            vector3f outputs:out
        }

        def Shader "NailsDryPattern"
        {
            float[] outputs:out
        }
    }

    def Scope "Materials"
    {
        def Material "HairMaterial" (
            variants = {
                string materialVariant = "Dry"
            }
            prepend variantSets = "materialVariant"
        )
        {
            variantSet "materialVariant" = {
                "Dry" {
                    vector3f outputs:disp.connect = </ShadingDefs/Shaders/HairDryDisp.outputs:out>
                    float[] outputs:pattern.connect = </ShadingDefs/Shaders/HairDryPattern.outputs:out>
                    color3f outputs:surf.connect = </ShadingDefs/Shaders/HairDrySurface.outputs:out>

                }
                "Wet" {
                    vector3f outputs:disp.connect = </ShadingDefs/Shaders/HairWetDisp.outputs:out>
                    float[] outputs:pattern.connect = </ShadingDefs/Shaders/HairWetPattern.outputs:out>
                    color3f outputs:surf.connect = </ShadingDefs/Shaders/HairWetSurface.outputs:out>

                }
            }
        }

        def Material "SkinMaterial" (
            variants = {
                string materialVariant = "Dry"
            }
            prepend variantSets = "materialVariant"
        )
        {
            variantSet "materialVariant" = {
                "Dry" {
                    vector3f outputs:disp.connect = </ShadingDefs/Shaders/SkinDryDisp.outputs:out>
                    float[] outputs:pattern.connect = </ShadingDefs/Shaders/SkinDryPattern.outputs:out>
                    color3f outputs:surf.connect = </ShadingDefs/Shaders/SkinDrySurface.outputs:out>

                }
                "Wet" {
                    vector3f outputs:disp.connect = </ShadingDefs/Shaders/SkinWetDisp.outputs:out>
                    float[] outputs:pattern.connect = </ShadingDefs/Shaders/SkinWetPattern.outputs:out>
                    color3f outputs:surf.connect = </ShadingDefs/Shaders/SkinWetSurface.outputs:out>

                }
            }
        }

        def Material "NailsMaterial" (
            variants = {
                string materialVariant = "Dry"
            }
            prepend variantSets = "materialVariant"
        )
        {
            variantSet "materialVariant" = {
                "Dry" {
                    vector3f outputs:disp.connect = </ShadingDefs/Shaders/NailsDryDisp.outputs:out>
                    float[] outputs:pattern.connect = </ShadingDefs/Shaders/NailsDryPattern.outputs:out>
                    color3f outputs:surf.connect = </ShadingDefs/Shaders/NailsDrySurface.outputs:out>

                }
                "Wet" {
                    vector3f outputs:disp.connect = </ShadingDefs/Shaders/NailsWetDisp.outputs:out>
                    float[] outputs:pattern.connect = </ShadingDefs/Shaders/NailsWetPattern.outputs:out>
                    color3f outputs:surf.connect = </ShadingDefs/Shaders/NailsWetSurface.outputs:out>

                }
            }
        }
    }
}

