How to detect specularity of a material hit with a line trace?

So I’m making a laser beam that bounces off reflective surfaces, but I’m finding it difficult to find the specularity of a material at runtime. Is there a way to detect this at all or am I out of luck?

Simplest is to create a parameter in each material called Roughness/Specularity/LaserBounciness and at runtime create a DynamicMaterialInstance on each of the queried objects and check the value of that float.

Alternatively you could use physical materials and simply bounce based on that. Simpler yet may conflict with other systems.

A downside to any system here is multiple levels of spec in the same material as it would be harder to know which value you hit without some render target juggling. Easiest to split all different levels of spec into different material indices.