Parameters used to build an unlit fragment shader.

interface UnlitFragmentShaderInputParams {
    toneMapping?: ToneMappings;
    additionalVaryings?: { type: string; name: string }[];
    chunks?: AdditionalChunks;
    geometry: Geometry;
    materialUniform?: BufferBindingBaseParams;
    materialUniformName?: string;
    baseColorTexture?: ShaderTextureDescriptor;
}

Hierarchy (View Summary)

Properties

toneMapping?: ToneMappings

Whether the shading function should apply tone mapping to the resulting color and if so, which one. Default to 'Khronos'.

additionalVaryings?: { type: string; name: string }[]

Optional additional varyings to pass from the vertex shader to the fragment shader.

Type declaration

  • type: string

    type of the varying.

  • name: string

    name of the varying.

Additional WGSL chunks to add to the shaders.

geometry: Geometry

Geometry used to create the fragment shader. Can use the vertexBuffers properties for vertex colors or tangent/bitangent computations.

materialUniform?: BufferBindingBaseParams

The BufferBindingBaseParams holding the material uniform values. Will use default values if not provided.

materialUniformName?: string

The BufferBindingBaseParams name to use for variables declarations. Default to 'material'.

baseColorTexture?: ShaderTextureDescriptor