English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 03 March 2014, 21:29   #1
71M
 
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
 
Old 03 March 2014, 22:24   #2
mc6809e
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.
mc6809e is offline  
Old 03 March 2014, 22:33   #3
71M
 
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:45.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09864 seconds with 15 queries