View Single Post
Old 08 September 2015, 02:51   #21
ReadOnlyCat
Code Kitten

 
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 47
Posts: 1,088
Quote:
Originally Posted by Mrs Beanbag View Post
The "Sine Wave Scroller" is basically a technique to distort a horizontal strip of an image along the y-axis by an arbitrary function of X on a per-pixel basis. It can be done efficiently by the blitter. I might have to illustrate this somehow but the idea is, if we were using small textures of maybe 16 pixels in height, we could use the blitter to stretch a strip along the Y-axis, by distorting the source strip progressively, and copying it line by line into the screen.
That's actually what I understood.
So for a strip which is distorted exactly diagonally you will have to proceed to 16 blitter copies of the original strip each copying only one column of the source, and if the bitplanes are not interleaved the number of blits is multiplied by 8.
In practice however perspective projection means that all lines of the strip must be distorted differently and on a y basis, so the distortion is a function of x and y and not just y.
Maybe I am misunderstanding but I get the feeling that this requires one blit per line and column except when walls are almost perpendicular to the line of sight.
ReadOnlyCat is offline  
 
Page generated in 0.03905 seconds with 11 queries