Babylon 4.0 PBR Shader Updates

About clear coat:
material.clearCoat.isEnabled = true;
material.clearCoat.intensity = 0.5; // 0-1 defaults to 1
material.clearCoat.roughness = 0.5; // 0-1 defaults to 0
material.clearCoat.texture = texture; // R is storing intensity and G roughness

Values not available in blender are:
material.clearCoat.isTintEnabled = true;
material.clearCoat.tintColor = Color3.Teal();
material.clearCoat.bumpTexture = texture; // dedicated bump texture for the coat

About sheen:
material.sheen.isEnabled = true;
material.sheen.intensity = 0.5; // 0-1 defaults to 1
material.sheen.color = Color3.Teal();
material.sheen.texture= texture; // RGB is color A is intensity

About anisotropy:
material.anisotropy.isEnabled = true;
material.anisotropy.intensity = 0.5; // 0-1 defaults to 1
material.anisotropy.direction = new Vector2(1, 0); // defines the orientation in tangent space
material.anisotropy.texture= texture; // RG is direction (-1 to 1 mapped to 0-255 like bump) and B is intensity

You can see all of them in the inspector. Doc should be coming in a couple of weeks.

1 Like