OptionaltoneWhether the shading function should apply tone mapping to the resulting color and if so, which one. Default to 'Khronos'.
OptionaladditionalOptional additional varyings to pass from the vertex shader to the fragment shader.
OptionalenvironmentEnvironmentMap to use for IBL shading.
OptionalcolorColorSpace to use for material uniform colors. All lighting calculations must be done in linear space. Default to srgb (which means the uniform colors are converted to linear space), but glTF internally use linear.
OptionalcolorOptionalopacityOpacity of the LitMesh. If different than 1, consider setting the transparent parameter to true. Default to 1.
OptionalalphaAlpha cutoff threshold value of the LitMesh. Default to 0.5.
OptionalmetallicThe metallic factor of the LitMesh. Default to 1.
OptionalroughnessThe roughness factor of the LitMesh. Default to 1.
OptionalnormalHow much the normal map affects the material normal texture if any. Typical ranges are [0-1]. Default to new Vec2(1).
OptionalocclusionA scalar multiplier controlling the amount of occlusion applied to the occlusion texture if any. Default to 1.
OptionalemissiveEmissive intensity to apply to the emissive color of the LitMesh. Default to 1.
OptionalemissiveOptionalspecularThe strength of the specular reflections applied to the LitMesh (not applicable to Lambert shading). Default to 1.
OptionalspecularOptionalshininessShininess of the LitMesh when using Phong shading. Default to 30.
OptionaltransmissionThe base percentage of light that is transmitted through the surface of the LitMesh. Only applicable to PBR shading if transmissive parameter is set to true. Default to 0.
OptionaliorThe index of refraction of the LitMesh. Default to 1.5.
OptionaldispersionThe strength of the dispersion effect, specified as 20/Abbe number. Only applicable to PBR shading if transmissive parameter is set to true. Default to 0.
OptionalthicknessThe thickness of the volume beneath the surface. The value is given in the coordinate space of the mesh. If the value is 0 the material is thin-walled. Only applicable to PBR shading if transmissive parameter is set to true. Default to 0.
OptionalattenuationDensity of the medium given as the average distance that light travels in the medium before interacting with a particle. The value is given in world space. Only applicable to PBR shading if transmissive parameter is set to true. Default to Infinity.
OptionalattenuationThe color as a Vec3 that white light turns into due to absorption when reaching the attenuation distance. Only applicable to PBR shading if transmissive parameter is set to true. Default to new Vec3(1).
OptionalsheenSheen color to use. Default to new Vec3(0), but sheen is not taken into account if this and sheenRoughness are not set.
OptionalsheenSheen roughness to use. Default to 0, but sheen is not taken into account if this and sheenColor are not set.
OptionalanisotropyAnisotropy strength. Default to 0, but anisotropy is not taken into account if not set or equal to 0.
OptionalanisotropyAnisotropy vector based on a rotation value, where x component is cos(rotation) and y component is sin(rotation). Default to new Vec2(1, 0).
OptionalclearcoatClearcoat layer intensity. Default to 0, but clearcoat is not taken into account if not set or equal to 0.
OptionalclearcoatClearcoat layer roughness. Default to 0.
OptionalclearcoatClearcoat normal map scale if any clearcoat normal texture is defined. Default to new Vec2(1).
OptionaliridescenceIridescence intensity factor. Default to 0, but iridescence is not taken into account if not set or equal to 0.
OptionaliridescenceIORIndex of refraction of the dielectric thin-film layer. Default to 1.3.
OptionaliridescenceMinimum and maximum thickness of the iridescence layer. Default to new Vec2(100, 400).
OptionalbaseBase color texture descriptor to use if any.
OptionalemissiveEmissive texture descriptor to use if any.
OptionalocclusionOcclusion texture descriptor to use if any.
OptionalnormalNormal texture descriptor to use if any.
OptionalmetallicMetallic roughness texture descriptor to use if any.
OptionalspecularSpecular texture descriptor (mixing both specular color in the RGB channels and specular intensity in the A channel) to use if any.
OptionalspecularSpecular intensity texture descriptor (using the A channel) to use if any.
OptionalspecularSpecular color texture descriptor (using the RGB channels) to use if any.
OptionaltransmissionTransmission texture descriptor to use if any.
OptionalthicknessThickness texture descriptor to use if any.
OptionalsheenSheen texture descriptor (mixing both sheen color in the RGB channels and roughness in the A channel) to use if any.
OptionalsheenSheen color texture descriptor (using the RGB channels) to use if any.
OptionalsheenSheen roughness texture descriptor (using the A channel) to use if any.
OptionalanisotropyAnisotropy texture descriptor to use if any.
OptionalclearcoatClearcoat texture descriptor (using the R channel) to use if any.
OptionalclearcoatClearcoat roughness texture descriptor (using the G channel) to use if any.
OptionalclearcoatClearcoat normal texture descriptor to use if any.
OptionaliridescenceIridescence texture descriptor (using the R channel for intensity and G channel for thickness) to use if any.
OptionaliridescenceIridescence texture descriptor (using the R channel) to use if any.
OptionaliridescenceIridescence thickness texture descriptor (using the G channel) to use if any.
OptionalshadingShadingModels to use for lighting. Default to PBR.
OptionaloutputIn 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.
OptionalvertexAdditional WGSL chunks to add to the vertex shaders.
OptionalfragmentAdditional WGSL chunks to add to the fragment shaders.
OptionalfragmentCustom fragment shader output structure members and returned values to use if needed. Useful when rendering to a Multiple Render Target for example.
Define the material parameters of a LitMesh.