OptionaltoneWhether the shading function should apply tone mapping to the resulting color and if so, which one. Default to 'Khronos'.
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.
OptionaladditionalOptional additional varyings to pass from the vertex shader to the fragment shader.
OptionalfragmentCustom fragment shader output structure members and returned values to use if needed. Useful when rendering to a Multiple Render Target for example.
OptionalchunksAdditional WGSL chunks to add to the shaders.
Geometry used to create the fragment shader. Can use the vertexBuffers properties for vertex colors or tangent/bitangent computations.
OptionalmaterialThe BufferBindingBaseParams holding the material uniform values. Will use default values if not provided.
OptionalmaterialThe BufferBindingBaseParams name to use for variables declarations. Default to 'material'.
OptionalreceiveWhether the shading function should account for current shadows. Default to false.
OptionalbaseBase color texture descriptor to use if any.
OptionalnormalNormal texture descriptor to use if any.
OptionalemissiveEmissive texture descriptor to use if any.
OptionalocclusionOcclusion 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.
Parameters used to build a phong fragment shader.