A Flash Developer Resource Site

Results 1 to 20 of 28

Thread: [FP10] GPU-accelerated sprite engine

Hybrid View

  1. #1
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Interesting. Still not convinced I see the advantage of a more complicated scene graph structure, though; I can do everything I need to in Flash's current setup. Is this a structure that you have to use for the GPU to handle it quickly, or would it be possible to accelerate Flash's primitive one?

    Clears a few things up, but did he give any indication of how we would know that it's on? And is it any good for blitting?
    http://www.birchlabs.co.uk/
    You know you want to.

  2. #2
    Knows where you live
    Join Date
    Oct 2004
    Posts
    944
    Quote Originally Posted by VENGEANCE MX
    Is this a structure that you have to use for the GPU to handle it quickly, or would it be possible to accelerate Flash's primitive one?
    That is the real issue. Here is a simplified rundown of how the GPU works:

    You set the current states (This will essentially consist of what texture you want to draw among other properties such as alpha blending). This is essentially the slowest (As in really, really slow) common operation you can do on the GPU.

    You perform a Draw call which will draw hundreds-thousands of triangles all with the same state.

    You repeat the steps for each different texture you have.

    This works fine for 3D models where thousands of triangles may share the same texture (And perhaps 30-50 textures total in a complex scene), but in flash you could have a hundred or so textures split up over only 200 objects which will completely drown the card in state changes without really doing anything. As well, you need to group objects by their renderStates so you are not switching back and forth between two renderStates (AKA you want to render AAABBB not ABABAB). This would require a traversal and sorting of the DisplayList. (That is why things like the SceneGraph are used, if stages are nodes then no sorting is necessary)

    Basically, GPU acceleration is designed to pump hundreds of thousands of the exact same thing to the screen (Which is why it is massively parallel). This is rarely the case in flash (Although it does happen sometimes).
    The greatest pleasure in life is doing what people say you cannot do.
    - Walter Bagehot
    The height of cleverness is to be able to conceal it.
    - Francois de La Rochefoucauld

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center