How do I make the clear coat work?

Hello friends, could someone explain to me how to apply the clear coat characteristics by code, I don’t understand if I should create a shader or a script, could someone help me? I have seen the example of the two spheres (https://playcanvas.github.io/#graphics/material-clear-coat.html) and the source but I don’t understand how to make it work.

Thanks

Hi @Ariel_Cancio,

Check one of the material tutorials on how to grab a reference to a material in your script:

https://developer.playcanvas.com/en/tutorials/?tags=materials

And then apply the clear coat material properties from the engine example: