Tuesday, December 4, 2018

c++ - Rendering performance in FlasCC + UDK when compared to Stage3d and UDK on Windows?


Adobe recently released the Flash C++ Compiler, which UDK uses to target Flash Player.


Developers can now access UDK for browser applications. Does this mean greater performance than using a Stage3D engine (Away3D 4) and how much of a noticeable difference in performance would it make in rendering speeds?


Is there any benchmark you could propose that would allow to compare them fairly? I am asking this to help myself understand the consequences in performance for deciding to use UDK in a browser based game. I would also like to know how it compares with UDK running natively in Windows?


I am not asking which technology to use or which is better. Only interested in optimizing rendering speed in a 3d browser game with flash.



Answer



Rendering speed for 3D FlasCC games/apps is likely to be similar to C++ apps for obvious reasons - the actual rendering takes place on the GPU. Flash includes a cross-platfrom shader language (AGAL) to describe GPU kernels (programs run per pixel on the GPU).


For CPU/computing speeds however, my tests have shown that the Alchemy toolkit at its best reaches 15% the speed of MS VC++ on Windows (with a simple encryption function operating on an array of bytes). Since Alchemy is now FlasCC, there may be improvements. Some benchmarks for the latest FlasCC are available here, that compare a set of C++ programs running as an EXE and in Flash Player.


This essentially comes down to:





  • Anything you can move to the GPU can possibly be done close to native speeds. This includes rendering, lighting, mip-mapping, and to some extent physics operations (depends on the library)




  • Anything still done on the CPU will be a few times slower than C++, so don't expect to have a million moving objects on screen with full physics even if you can do that with the native (C++) library.




  • Flash vector graphics does not use the GPU and is rendered fully on the CPU. So if you need HUDs (heads up displays) with high-performance 3D vector rendering like what Scaleform provides for C++ apps, don't expect that to be easily possible in Flash Player, unless you're willing to roll your own 3D vector renderer that takes advantage of the GPU to composite vector shapes.





No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...