POV-Ray : Newsgroups : povray.programming : first colum and last row active?? : Re: first colum and last row active?? Server Time: 19 Aug 2019 14:58:20 GMT
  Re: first colum and last row active??  
From: clipka
Date: 27 Feb 2011 14:55:02
Am 27.02.2011 13:51, schrieb Aidy:
> Le_Forgeron<jgr### [at] freefr>  wrote:
>> Le 26/02/2011 20:23, Aidy nous fit lire :
>>> Hiya,
>>> I'm working on a project using porvay, and am currently looking through the
>>> "Start_Adaptive_Tracing" method and inside the loop (over columns then rows)
>>> there are two for loops which are commented as setting the last row inactive and
>>> setting the first column inactive.
>>> I was just wondering what these actually do as I'm a little confused by them?
> It's the release available on the main site, so version 3.6.2, June 2009.
> The file I'm currently looking in is render.cpp in the Start_Adaptive_Tracing
> method.
> I'm getting confused at line 1535, which should be :
> for (xx = 0; xx<  sub_pixel_size * Frame.Screen_Width + 1; xx++)

The .active flag marks whether the sub-pixel has been rendered already.

For the sake of anti-aliasing, adjacent pixels overlap by one sub-pixel; 
these overlapping pixels are computed at most once (maybe not at all, if 
neither of the pixels needs anti-aliasing), and copied over for the next 
pixel if already computed. As there is nothing to copy /from/ in the 
very first row of pixels and the very first column of pixels, their 
respective topmost / leftmost sub-pixels need to be explicitly 
initialized to "not rendered yet" rather than copied.

The copying of the overlapping columns of sub-pixels happens at the end 
of each iteration, hence the carried-over sub-pixels are expected to 
already be in the first column (of sub-pixels of that pixel) at the 
start of each iteration; the copying of overlapping sub-pixel rows, on 
the other hand, is done at the start of iteration, so those sub-pixels 
are expected to still be in the last row (of sub-pixels of the previous 
pixel row) at the start of each iteration.

Post a reply to this message

Copyright 2003-2008 Persistence of Vision Raytracer Pty. Ltd.