• Create a shader from named shader chunks.

    Parameters

    • device: GraphicsDevice

      The graphics device.

    • vsName: string

      The vertex shader chunk name.

    • fsName: string

      The fragment shader chunk name.

    • OptionaluseTransformFeedback: boolean | Record<string, string | boolean | string[]> = false

      Whether to use transform feedback. Defaults to false.

    • OptionalshaderDefinitionOptions: { fragmentOutputTypes?: string | string[]; useTransformFeedback?: boolean } = {}

      Additional options that will be added to the shader definition.

      • OptionalfragmentOutputTypes?: string | string[]

        Fragment shader output types, which default to vec4. Passing a string will set the output type for all color attachments. Passing an array will set the output type for each color attachment.

      • OptionaluseTransformFeedback?: boolean

        Whether to use transform feedback. Defaults to false.

    Returns Shader

    The newly created shader.

    ShaderUtils.createDefinition