user: Give a detailed overview of Surface: syntax, arguments, return values, common patterns.

assistant: [image reference removed]

Shader panel with only Stroke component activated.

### Stroke

When enabled, the shader use the stroke component.
The *Stroke* component controls how to render the edit lines.

Line Type
:   Defines how to display or distribute the output material over the stroke.

    Line:
    :   Connects every points in the strokes showing a continuous line.

    Dots:
    :   Use a disk shape at each point in the stroke.
        The dots are not connected.

    Squares:
    :   Use a square shape at each point in the stroke.
        The squares are not connected.

Style
:   The type of the material.

    Solid:
    :   Use a solid color.

    Texture:
    :   Use an image texture.

        Image
        :   The image data-block used as an image source.

        Blend
        :   Texture and Base Color mixing amount.

        UV Factor
        :   The image size along the stroke.

Base Color
:   The base color of the stroke.

Holdout
:   Removes the color from strokes underneath the current by using it as a mask.

Alignment
:   Defines how to align the *Dots* and *Squares* along the drawing path and with the object’s rotation.

    Path:
    :   Aligns to the drawing path and the object’s rotation.

    Object:
    :   Aligns to the object’s rotation; ignoring the drawing path.

    Fixed:
    :   Aligns to the screen space; ignoring the drawing path and the object’s rotation.

Rotation
:   Rotates the points of *Dot* and *Square* strokes.

Self Overlap
:   Disables stencil and overlap self-intersections with alpha materials.

Samples of different material strokes mode types and styles.

|  |  |  |  |
| --- | --- | --- | --- |
| ../../_images/grease-pencil_materials_properties_stroke-solid-line.png   Mode Type: Line, Style: Solid. | ../../_images/grease-pencil_materials_properties_stroke-texture-line.png   Mode Type: Line, Style: Texture. | ../../_images/grease-pencil_materials_properties_stroke-solid-dot.png   Mode Type: Dot, Style: Solid. | ../../_images/grease-pencil_materials_properties_stroke-texture-dot.png   Mode Type: Dot, Style: Texture. |

### Fill

When enabled, the shader use the fill component.
The *Fill* component control how to render the filled areas determined by closed edit lines.

Style
:   The type of material.

    Solid:
    :   Use solid color.

    Gradient:
    :   Use a color gradient.

        Gradient Type
        :   Linear:
            :   Mix the colors along a single axis.

            Radial:
            :   Mix the colors radiating from a center point.

    Texture:
    :   Use an image texture.

        Image
        :   The image data-block used as an image source.

    Samples of different material fill styles.

    |  |  |  |  |
    | --- | --- | --- | --- |
    | ../../_images/grease-pencil_materials_properties_fill-solid.png   Style: Solid. | ../../_images/grease-pencil_materials_properties_fill-gradient.png   Style: Gradient (Linear). | ../../_images/grease-pencil_materials_properties_fill-gradient-radial.png   Style: Gradient (Radial). | ../../_images/grease-pencil_materials_properties_fill-texture.png   Style: Texture. |

Base Color
:   The base color of the fill.

Secondary Color Gradient
:   The secondary color.

Holdout
:   Removes the color from strokes underneath the current by using it as a mask.

Blend Gradient / Texture
:   The amount that the *Secondary Color* (for *Gradient Style*) or image texture (for Texture Style) mixes with the
    *Base Color*.

Flip Colors Gradient
:   Flips the gradient, inverting the Base Color and *Secondary Color*.

Location X, Y Gradient / Texture
:   Shifts the position of gradient or image texture.

Rotation Gradient / Texture
:   Rotates the gradient or image texture.

Scale X, Y Gradient / Texture
:   Scales the gradient or image texture.

Clip Image Texture
:   When enabled, show one image instance only (do not repeat).