Clear Coat
Adds a secondary specular layer on top of base material. Creates dual-layer reflections for car paint, varnished wood, coated plastics.
Requires MATERIAL_CLEAR_COAT constant.
Parameters
clearCoatNormalTexture
texture
Default:Normal Z up
Normal map for clear coat layer
clearCoatRoughnessTexture
texture
Default:White
Roughness texture for clear coat layer
clearCoatRoughness
float
Default:0
Roughness of clear coat layer
clearCoatNormalTexScale
float
Default:1
Clear coat normal map tiling scale
clearCoatStrength
float
Default:0
Strength of coating layer effect
Example

clearCoatStrength: 1.0
clearCoatRoughness: 0.0Shader Implementation
// Roughness from green channel
clearCoatRoughness *= texture(clearCoatRoughnessTexture).g;
// Normal map with custom UV scale
vec2 clearCoatUv = uv * clearCoatNormalTexScale;
vec3 clearCoatNormal = sample_normal_map(clearCoatNormalTexture, clearCoatUv);