After adding an outline to the model upon clicking and then removing the outline using the method described in this link: PlayCanvas Examples, the material flickers. The outline was added by modifying the
render.layers values, setting it to [0, 6], and removing it by setting it to . After removal, the model’s material alternates between a normal appearance and an abnormal appearance. The material appears normal when the camera is on the left side but abnormal when the camera is on the right side.
Before adding the outline, there was a material replacement done, specifically for the materials that were replaced before adding the outline. There were no material operations performed after adding the outline.
The material replacement code is as follows:
If the outline is not added, it displays normally. The outline is added to the current model after clicking. Removing the outline code also results in the display being normal.