[Feature Request] Swiftshader Support For NW.js Exports

0 favourites
  • 10 posts
From the Asset Store
Comprehensive localization solution for Construct 3 projects, no addons required!
  • This request is about adding support for Swiftshader in order to improve the general user experience with Construct 2 and 3's desktop game exports. Swiftshader makes it possible to use WebGL even on hardware with incapable GPUs. Users which previously couldn't run our games properly, could run them now with the help of this feature.

    Swiftshader is shipping by default within the Google Chrome browser on Windows and Linux. It will be enabled automatically when it's needed with incapable GPUs, which can be checked with navigating to 'chrome://gpu'.

    ...Swiftshader lets you use CSS 3D and WebGL even on hardware with incapable GPUs.

    h2]Sources: https://github.com/nwjs/nw.js/issues/6498, https://groups.google.com/forum/#!topic ... iOhx7GtPRA

    Construct 3 Desktop already added support for Swiftshader and our games should have support for it as well.

    I personally went out of my way to talk with the NW.js developer first and asked 3 questions regarding Swiftshader.

    It seems to have no downsides at all and the fact that Construct 3 Desktop already supports it, suggests that Scirra ( Ashley ?) knows how to implement it properly.

    Thanks for reading and I'd really appreciate an official response.

    ~TheRealDannyyy

  • Swiftshader is a software renderer. Software rendering is slow. People don't want their games to be slow. This is the whole reason the "Disable GPU blacklist" option exists: it will prevent the use of software rendering and ensure the game is fast using the GPU (at the risk of glitches due to known graphics driver bugs).

    Further, SwiftShader is a software renderer for WebGL. If the GPU is blacklisted and the blacklist is enabled, then Construct games already drop back to canvas2d, which will probably be software rendered (and AFAIK that doesn't use SwiftShader).

    The C3 runtime will not use a canvas2d fallback so will need a software WebGL renderer. For that reason, we will probably include SwiftShader. Other than that, the only use case for this is pretty much: you want to use WebGL shader effects on a system with no hardware GPU at all. That's kind of a tiny niche, especially amongst gamers. I'm guessing you weren't aware that disabling the GPU blacklist would also disable Swiftshader, and the fact there is already an existing canvas2d software renderer.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Swiftshader is a software renderer. Software rendering is slow. People don't want their games to be slow. This is the whole reason the "Disable GPU blacklist" option exists: it will prevent the use of software rendering and ensure the game is fast using the GPU (at the risk of glitches due to known graphics driver bugs).

    I'm not sure what you're trying to say here, you would rather have our games to run "fast" with glitches instead of running them with slower but glitchless Swiftshader?

    I mean all it takes is to simply ship the files instead of removing them and it will be enabled automatically only if needed anyway.

    I know that Swiftshader is a software renderer but I haven't seen any solid evidence that it runs that much slower, I guess that's an assumtion based on the fact that hardware renderers are generally considered to be better and even if it would run slower, still a more viable option over running our games with glitches in my opinion.

    Further, SwiftShader is a software renderer for WebGL. If the GPU is blacklisted and the blacklist is enabled, then Construct games already drop back to canvas2d, which will probably be software rendered (and AFAIK that doesn't use SwiftShader).

    The C3 runtime will not use a canvas2d fallback so will need a software WebGL renderer. For that reason, we will probably include SwiftShader. Other than that, the only use case for this is pretty much: you want to use WebGL shader effects on a system with no hardware GPU at all. That's kind of a tiny niche, especially amongst gamers. I'm guessing you weren't aware that disabling the GPU blacklist would also disable Swiftshader, and the fact there is already an existing canvas2d software renderer.

    Thanks for the info but the fact that you've decided to drop canvas2d for swiftshader seems to go against your own arguments against using it.

    So Swiftshader is better than Canvas2d I guess? Why not simply drop canvas2d entirely for Swiftshader on both C2 and C3 exports instead of doing it just for C3?

  • Basically I'm saying:

    • "ignore GPU blacklist" contradicts "use Swiftshader", because if you ignore the GPU blacklist, it will never use Swiftshader
    • there is currently no reason to use Swiftshader because we already have a software rendered fallback to canvas2d. However most people want their games to run faster, even with risk of glitches, so they use the "ignore GPU blacklist" setting, which disables software rendering.

    So there's no reason to do this now. We'll probably do it later though, since it makes sense for the C3 runtime - assuming you don't use "ignore GPU blacklist". Again, if you do, that literally disables Swiftshader, so...

  • Basically I'm saying:

    - "ignore GPU blacklist" contradicts "use Swiftshader", because if you ignore the GPU blacklist, it will never use Swiftshader

    - there is currently no reason to use Swiftshader because we already have a software rendered fallback to canvas2d. However most people want their games to run faster, even with risk of glitches, so they use the "ignore GPU blacklist" setting, which disables software rendering.

    So there's no reason to do this now. We'll probably do it later though, since it makes sense for the C3 runtime - assuming you don't use "ignore GPU blacklist". Again, if you do, that literally disables Swiftshader, so...

    Alright got it. I guess if people really want the risk of glitches in their games for faster running games, then it doesn't matter that C2 won't use Swiftshader.

    Good to know that the new C3 runtime is going to use it though, thanks for the help!

  • Ashley just a quick question. I've downloaded v0.30.0 from the C2 NW.js download page and it has Swiftshader included.

    Is that intentional, does C2 support it now or did you forget to remove it while creating the installer?

  • Now the C3 runtime is in alpha we've started shipping Swiftshader with NW.js so we're ready it. (You can't export with the C3 runtime yet but we're ramping up in advance.)

  • Now the C3 runtime is in alpha we've started shipping Swiftshader with NW.js so we're ready it. (You can't export with the C3 runtime yet but we're ramping up in advance.)

    I know that C3 was going to get this soon but what I meant was that the recent C2 installer version also has the files. The C3 runtime will not be backported as far as I know so I guess there is no reason for Swiftshader to be inside the NW.js C2 installer (since C2 will keep using Canvas2d)?

  • Oh right - yeah, SwiftShader won't be used there. For simplicity I'm just deploying the same files to both at the moment.

  • Oh right - yeah, SwiftShader won't be used there. For simplicity I'm just deploying the same files to both at the moment.

    Alright, thanks for the info.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)