View Single Post
Old 16 December 2019, 19:13   #14
deimos
It's coming back!
 
deimos's Avatar
 
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
Quote:
Originally Posted by a/b View Post
OK, i see. Not a typical poly renderer.

Option 1:
Assuming you clear the entire bitplane beforehand, and the horizon is a simple straight line: find min_y and max_y (screen coords) of the plane while drawing sky/plane lines and then only fill between them.

Option 2:
How about a simple post-processing loop to clear bytes that are equal to 1 (only the rightmost pixel is set), something like:
Code:
char  table[256] = { 0, 0, 2, 3, 4, ..., 255 };  // 1 is mapped to 0, the rest is unchanged
char* p_plane = sky_plane_bitplane+width/8-1; // last byte of the first line
for (int h = 0;  h < height;  ++h)
  { *p_plane = table[*p_plane];  p_plane += width/8; }
I think option 1 is conceptually similar to my idea of splitting the blit.

I'm not understanding your option 2 though. Exactly why would we want to do that?

Edit: Oh, post-process the result...

Edit 2: I could just draw the line again to do that, I know where it starts and ends. I'll investigate this further. Adding the line is a kludge, I don't have a problem adding a second kludge to unkludge it.

Last edited by deimos; 16 December 2019 at 19:32.
deimos is offline  
 
Page generated in 0.04463 seconds with 11 queries