gpu-curtains
    Preparing search index...

    Parameters used to build an lambert fragment shader.

    interface LambertFragmentShaderInputParams {
        toneMapping?: ToneMappings;
        outputColorSpace?: ColorSpace;
        additionalVaryings?: { type: string; name: string }[];
        fragmentOutput?: FragmentOutput;
        chunks?: AdditionalChunks;
        geometry: Geometry;
        materialUniform?: BufferBindingBaseParams;
        materialUniformName?: string;
        receiveShadows?: boolean;
        cullMode?: GPUCullMode;
        flatShading?: boolean;
        baseColorTexture?: ShaderTextureDescriptor;
        emissiveTexture?: ShaderTextureDescriptor;
        occlusionTexture?: ShaderTextureDescriptor;
        normalTexture?: ShaderTextureDescriptor;
    }

    Hierarchy (View Summary)

    Index

    Properties

    toneMapping?: ToneMappings

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

    outputColorSpace?: ColorSpace

    In which ColorSpace the output should be done. srgb should be used most of the time, except for some post processing effects that need input colors in linear space (such as bloom). Default to srgb.

    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.

    fragmentOutput?: FragmentOutput

    Custom fragment shader output structure members and returned values to use if needed. Useful when rendering to a Multiple Render Target for example.

    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'.

    receiveShadows?: boolean

    Whether the shading function should account for current shadows. Default to false.

    cullMode?: GPUCullMode

    Culling mode to use for normal and tangent calculations. Default to back.

    flatShading?: boolean

    Whether the material should be rendered using flat shading. Default to false.

    baseColorTexture?: ShaderTextureDescriptor

    Base color texture descriptor to use if any. Format should be rgba8unorm-srgb.

    emissiveTexture?: ShaderTextureDescriptor

    Emissive texture descriptor to use if any. Format should be rgba8unorm-srgb.

    occlusionTexture?: ShaderTextureDescriptor

    Occlusion texture descriptor to use if any. Format must be at least r8unorm.

    normalTexture?: ShaderTextureDescriptor

    Normal texture descriptor to use if any. Format should be rgba8unorm.