Are there any ways to evaluate the performance of a video card in order to set the appropriate settings for a webGL application? I use blend4web.

For example, there is such a code that recognizes the relative pixel density and on its basis increases the resolution of the Canvas:

var devicePixelRatio = window.devicePixelRatio || 1; if ( devicePixelRatio > 1 ){ m_config.set("canvas_resolution_factor", 2); } 

But at the same time, some non-top android devices or old iPhones may not draw such settings, FPS will be low. In their case, it is better to leave the canvas_resolution_factor as it is.

The problem is that it is not known how to make estimates about device performance.

Approximately the same can be said about desktops. On devices with a good video card, you can set additional effects.

  • You can try to run a performance test and build on its results. And you can make this a setting, and let the user decide for himself what is acceptable for him and what is not. For example, I would be very discouraged if any game would decide with what “not quite low FPS” I would play (and, most likely, suffer). And this is not to mention the inaccuracy of the tests (incomplete assessment and "now it works like this, but tomorrow it is slower") - Regent
  • one
    @Regent Yes, I understand when setting up in games, but imagine a web application in which a user logs in, maybe once for a few minutes? Overload the interface with additional controls, and so you need to quickly understand? - Crantisz
  • Making the user compulsorily poking around in dozens of settings, half of which have incomprehensible names, is, of course, not the case. However, it is worth giving someone the opportunity to change something. And the default values ​​for the settings can be chosen not on the basis of performance tests, but such that as few users as possible have to enter the settings. I did not come across such tasks, but it seems to me that in JS in the browser nothing really can be tested / defined in terms of performance - Regent
  • Only if an honest benchmark. Graphics cards have many parameters, and there are various kinds of loads on them. - D-side

0