Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 35

Thread: Low fps even on empty canvas.

  1. #11
    Member Coolcat's Avatar
    Join Date
    Oct 2009
    Location
    NRW, Germany
    Posts
    75

    Re: Low fps even on empty canvas.

    My scene is not empty... Also I didn't say anything about the CPU load. However, when running UltimateConquest the CPU load is at about 60%, using only one of four available cores.

  2. #12
    Junior Member
    Join Date
    Dec 2009
    Posts
    9

    Re: Low fps even on empty canvas.

    I talk about my own tests. I`ve tested an empty scene on several configs with the same result: tooo low fps, high cpu load.
    UltimateConquest consists of several balls. I don't want to minish it, but it's not the big deal for 8800GTS. Crysis show more fps on my pc, and I think, it's not a problem of UltimateConquest.
    So, my conclusion is simple: WebGL needs a __full__ hardware support.

  3. #13
    Junior Member
    Join Date
    Dec 2009
    Posts
    8

    Re: Low fps even on empty canvas.

    http://khronos.org/webgl/wiki/Getting_Started

    "Tight integration with HTML content, including layered compositing, interaction with other HTML elements[...]"

    This is the problem. It behaves like Flash with wmode=transparent by default. Which is nice. But this is also very slow and in many cases it's also completely pointless.

    We really need some kind of switch to bypass all those extra steps completely. Something which makes it behave like an opaque overlay. LWJGL applets are like that for example. The framerate is almost completely unaffected by running it in a browser.

  4. #14
    Member Coolcat's Avatar
    Join Date
    Oct 2009
    Location
    NRW, Germany
    Posts
    75

    Re: Low fps even on empty canvas.

    You can disable alpha when creating the context. According to spec you can pass a WebGLContextAttributes object to the getContext() method. However, I didn't try it yet.

  5. #15
    Junior Member
    Join Date
    Dec 2009
    Posts
    8

    Re: Low fps even on empty canvas.

    Quote Originally Posted by Coolcat
    You can disable alpha when creating the context. According to spec you can pass a WebGLContextAttributes object to the getContext() method. However, I didn't try it yet.
    Not implemented anywhere yet. But even if you disable it, you'd still get that copying around etc, because the browser is still compositing around. (I.e. you can put other HTML elements on top of it - and they will be visible.)

    My suggestion is to use something like compositing=transparent|opaque|overlay instead of alpha=true|false.

    Transparent would be like alpha=true, opaque would be like alpha=false, and overlay would mean it's just rendered on top. Flash handles it exactly this way for example. Flash uses "window" instead of "overlay" though, but "overlay" is a bit clearer, I think.

    Or buffer=transparent|opaque|overlay. I really don't care how it's called. But this option should be there. Layered compositing is very slow and generally not required.

  6. #16
    Junior Member
    Join Date
    Dec 2009
    Posts
    8

    Re: Low fps even on empty canvas.

    The forum software just decided to throw my edit away. Great.

    "Very slow" = ~27fps with older Chromium builds, ~85fps with a very recent one. While taking 100% CPU for drawing an empty 800x600 window.

    Without compositing the CPU usage would be below 1% at this framerate.

    If we want full screen gaming and good performance (=lower energy consumption) on mobile devices, we really need a way to bypass the compositing completely.

  7. #17
    Member
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    90

    Re: Low fps even on empty canvas.

    This definitely sounds like a good topic for the public WebGL mailing list, where the details of the spec are being hammered out: https://www.khronos.org/webgl/public-mailing-list/

  8. #18
    Junior Member
    Join Date
    Jan 2010
    Posts
    1

    Re: Low fps even on empty canvas.

    I have been encouraged to post so that this issue receives more attention. At the moment, I'm drawing a simple 30x30 textured sphere full screen, and Flash is much faster than the 8fps speed that I'm getting. What I'm doing is a very common operation for displaying 360 degree panoramas, and this is definitely a minimum base standard that WebGL needs to be able to handle.

    This is apparently due to browser compositing, with glReadPixels being used to transfer from pbuffers to display, so that HTML objects can be laid over the top of WebGL views. I have absolutely no need for this, and I do really very much need to have full screen full speed displays with the full power of OpenGL ES 2.0 being applied to compensate for Javascript slowness.

    Would it be possible to have a wmode=window or other setting that will effectively say "thanks browser, I'll look after this bit of the screen", so that the mighty hardware powers can be unleashed onto that area of visual splendour? I feel this is a matter of life or death for WebGL!

  9. #19
    Member
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    90

    Re: Low fps even on empty canvas.

    Just to echo what people are saying on the mailing list; that does sound very slow. I've hacked up my last lesson (which draws a sphere with 30 lats and 30 longs and textures it) to scale it up to 1200 by 1000, and it seems absolutely fine -- JS's timing function is reporting less than a millisecond for a repaint, and while that seems a bit dubious, by eye it looks perfectly smooth so I must be getting order of 60fps. This is on a pretty low-end office-spec PC with an ATI 2400, running Minefield under Vista. Perhaps, as you were thinking on the list, it might just be the OS/browser combo you're using right now has specific problems in that area.

  10. #20
    Junior Member
    Join Date
    Dec 2009
    Posts
    8

    Re: Low fps even on empty canvas.

    The problem is that you're utilizing 100% CPU for drawing that at merely ~60 FPS. Without that copy/compositing overhead you'd be at ~1% (at that framerate).

    For example if the canvas is big enough to limit your empty scene to 60fps... and then you add some game logic which would limit the framerate to 60 if there were no copy/compositing overhead... then your effective framerate is halved.

    Doesn't sound that bad with 60/30, but what about 30/15 or 20/10?

    If you do heavy math which would limit it to 30 fps, you'd also get only about 20fps instead of 30.

    1000/30=33.333 ~33msec for math
    1000/60=16.666 ~17msec for drawing overhead

    33+17=50msec for everything

    1000/50=20fps (without actually drawing anything)

    I'd rather use those resources which are wasted on copying/compositing on something else. Like drawing, logic, or reducing energy consumption.

    It's an option in Flash for a reason. Compositing defaults to off there by the way.

Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Very Low FPS on Fedora 9 and Minefield
    By fedoraUser in forum OS & Browser specific questions
    Replies: 2
    Last Post: 06-07-2011, 12:12 AM
  2. Low FPS
    By ninjanesto in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 04-21-2006, 01:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •