Circle/Ring Around Mouse Pointer using Custom Material on PBR Material (?)

Hi, I am currently trying to follow the steps of doing a circle around the mouse pointer.

I tried following the steps of this playground coming from a previous post. https://playground.babylonjs.com/#8ZQVW1#4

Now I just realized that my current mesh uses a PBR material (But the approach uses a standard material). What should I do to include the current material set with the circle around the mouse pointer? How can I translate a PBR material to StandardMaterial? I’ve also noticed that there is a PBRCustomMaterial, will it also be possible to use it to create the circle over mouse pointer?

Any help is greatly appreciated,
Thank you

Yes, you can use PBRCustomMaterial instead of CustomMaterial. The only thing to change in the shader is color => finalColor:

https://playground.babylonjs.com/#8ZQVW1#10

If I have a current pbr material, is it possible to send the values to the custom pbr material as well?

What do you mean? The material can either be a PBRMaterial or a CustomPBRMaterial but not both at the same time.

To get the look and feel of the PBRMaterial that has defined textures or settings already and send everything to the CustomPBRMaterial .

The PBRMaterial is coming from a .glb file and I’m using the CustomPBRMaterial to have the cursor but I want to copy the PBR Material and look like it wasn’t replaced with a new material

You will need to recreate the material as a PBRCustomMaterial.

You can do it like this in a generic way:

https://playground.babylonjs.com#SAFX6T#7