A.D.A. Amiga Demoscene Archive

  Welcome guest! Please register a new account or log in

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Coding / overlapping blitter polys

 

Author Message
dalton
Member
#1 - Posted: 4 Jul 2010 15:51
Reply Quote
Does anyone here know how they used to render overlapping polygons back in the days? The problem I have in mind is that blitter fill only works on empty spaces, not when there is graphics on screen already. Perhaps it is necessary to render to a blank intermediate buffer and then copy with mask onto the real bitplane? That seems rather tedious...

/Dalton
ZEROblue
Member
#2 - Posted: 5 Jul 2010 03:05
Reply Quote
Two methods:

1. Draw one polygon at a time. Use a single bitplane as intermediate buffer, clear the bounding rectangle, draw edges and fill, then use this to do bitwise OR and AND for each bitplane in your screen.

2. Draw several polygons at once by splitting your concave mesh into smaller convex sets, and sort the order of the sets rather than the individual polygons. To draw each set you clear the bounding rectangle on all bitplanes of the intermediate, determine visible edges and detect and remove duplicates, draw edges, fill all bitplanes and generate the mask, and then copy the whole set of polygons into the screen at once.

Which method is the fastest probably varies on a case basis, though the first straight forward method probably wins most of the time even if it has more overhead per individual polygon.

If you're on at least an A1200 with some fastmem, wouldn't it be faster to draw the polygons with the CPU?
dalton
Member
#3 - Posted: 7 Jul 2010 10:37
Reply Quote
Suggestion 2 seems like a good approach if it's possible to perform that kind of polygon separation...

CPU rendering is probably faster even on systems without fastmem. But for low-poly counts it might be more efficient to use the blitter, which would free cycles for the cpu as they work in parallel.

As you said, the answer to this question most likely varies from case to case. But thanks for the ideas!

 

  Please register a new account or log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0