03 March 2014, 21:29 | #1 |
Posts: n/a
|
Fast Blitter Line Clipping
Hi,
I'm trying to find information on how best to go about clipping lines drawn with the Blitter. It seems like a pretty slow calculation to do, are there any tricks that can be used to speed things up? Cheers, 71M |
03 March 2014, 22:24 | #2 |
Registered User
Join Date: Jan 2012
Location: USA
Posts: 372
|
Recursive subdivision of the line is suppose to be pretty fast. It's like a binary search for the point of the line the intersects the edge.
Find the midpoint of the line by computing the average. This is easy with adds and shifts. Determine which half of the line contains the intersecting edge. Subdivide that edge again by computing the average. Repeat until you've found the pixel. |
03 March 2014, 22:33 | #3 |
Posts: n/a
|
Excellent, I'd never have thought of that approach! Thanks for the advice!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blitter busy flag with blitter DMA off? | NorthWay | Coders. Asm / Hardware | 9 | 23 February 2014 21:05 |
Screen right edge clipping issue | mark_k | support.WinUAE | 0 | 05 January 2014 19:28 |
Clipping line for blitter fill | leonard | Coders. Asm / Hardware | 12 | 27 April 2013 12:03 |
One "hole" in each scan line to turn off blitter nasty? | mc6809e | Coders. Asm / Hardware | 1 | 03 July 2012 12:12 |
Line mode blitter | absence | Coders. General | 4 | 25 September 2009 20:50 |
|
|