Detecting if i am on a mobile/low-end device NOT FOR UI REASONS

i want to know if there’s any way to determine if a user is on a mobile device/one roblox considers “low end” so i can adapt my visual effects to the alternate rendering system.

most importantly i want to be able to tell if my outlines are going to render or not and if the behavior highlights have on pc where objects poke holes into other highlights is going to work or not

these effects will not work at all on mobile, and i’d be fine with that if i had any consistent way of detecting that it won’t work so i can disable it on those devices

i have spent the past hour or two looking for any way of detecting how highlights are going to render and i have found nothing but people saying “i shouldn’t be detecting if it’s a mobile device because i should adapt my ui to the input device and not the device itself”, which isn’t my problem. almost every single one of these topics is talking about ui, but none of them bring up the very glaring other aspect that is affected by whether you’re on mobile or not and that’s how different rendering is on mobile. this includes no DOF, lower quality shadows, no SSAO afaik, no HDR, and most importantly with the new highlight object, which does not render outlines at all on mobile. this is a bit of a problem that i have no way of telling whether or not highlights are actually going to render how i want them to since i have no reliable way of telling whether i’m on a “low-end” device or not. i have a lot of visual effects that use highlights with outlines and i want to be able to use an alternate version in case i’m on a device that won’t display those properly

The closest way to detecting mobile devices is checking if the touchpad is enabled. However, this is not foolproof as several other devices can have the same controls enabled if they are touch screen meaning some other devices such as touchscreen laptops will be falsely detected as mobile devices too.

-- this is exactly why i’m asking, this is not a good way of detecting this

there arent really good ways to detect it, you can check the viewport size and if keyboard is enabled - otherwise theres not really much to do other than the user themselves selecting whether they’re on a high/low end device

You can try reading my (old) module’s code that does device detection and stuff like that: (doesn’t gurantees you that the device it checks is actually what it is or not)