lp:~vcs-imports/aqsis/trunk

Created by VCS imports and last modified
Get this branch:
bzr branch lp:~vcs-imports/aqsis/trunk

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
VCS imports
Project:
Aqsis
Status:
Development

Import details

Import Status: Invalid

Last successful import was .

Import started on galapagos and finished taking 20 seconds — see the log
Import started on galapagos and finished taking 50 seconds — see the log
Import started on galapagos and finished taking 1 minute — see the log
Import started on galapagos and finished taking 15 seconds — see the log

Whiteboard

branch no longer exists

Recent revisions

1840. By c42f

Bugfix for CqSampleIterator to avoid crash for empty CqRegions.

The CqSampleIterator interface (new in r2838) allowed invalid pixel access when
the CqRegion provided was empty. A check is inserted to fix this.

Also fixed a problem with invalid code inside an assert() which caused the
debug build to fail.

1839. By c42f

Bug fix for r2841 which did't compile (oops) and code reformatting.

r2841 contained some typos made just prior to checkin - these are fixed in this
revision. Unnecessary scopes and old commented-out code was removed from the
sampling functions to make them easier to read.

1838. By c42f

Optimisation: occlusion culling for early rejection in micropolygon sampling.

If a micropolygon bound lies behind the current opaque hit for a sample
we can occlusion cull the micropolygon for that sample point. This means we
can avoid the more costly point-in-polygon test because we would just throw out
the result anyway.

In scenes where the occlusion tree is less efficient - such as for large motion
blur or depth of field - this optimisation is quite effective at reducing
rending times (petuia.rib: 10% or so on amd64), and also shows modest
improvements for scenes with normal occlusion (capsules.rib: ~2%).

1837. By c42f

Cleanups to remove various static variables and unneded #includes

* Move CqPixelPool into imagepixel.h, and make the pool used by the bucket
  processor a member of CqBucketProcessor for now. This might need to change
  in the future with multithreading, but it's the simplest alternative to the
  global pool for now.
* Remove various unneeded #includes from various files.
* Remove all static members of CqBucketProcessor, and make them normal members.
  Initialise some of them in the constructor rather than
  setupCacheInformation().
* Rearrange the order of the CqBucketProcessor members to allow CqPixelPool to
  be initialised using previously initialised members.
* Make CqBucketProcessor::setupCacheInformation() private and call it from the
  constructor rather than once inside CqImageBuffer.
* Make the CqBucketProcessor constructor initialise all members.

1836. By c42f

Remove the subCellIndex member from SqSampleData

The index for the multijittered subcell was necessary for the old method of
filtering - it tried to cache the filter values more accurately for the special
case of the multijittered sampling pattern.

A generic sample point interface was added in r2835, so the sub cell index is
no longer relevant. Filter values are now simply cached at the centre of the
subpixels, which is slightly more efficient anyway and seems to give perfectly
reasonable results.

Also moved a check for a valid filter function from InitialiseFilterValues to
RiPixelFilter.

1835. By c42f

Optimisations to occlusion tree - make every leaf node have exactly one sample.

Previously, the occlusion tree was set up to span the entire sample region of
the current bucket. However, since it's a balanced binary tree, if the number
of samples in the x and y directions aren't power-of-two then the leaf nodes of
the tree don't contain exactly one sample. This leads to several complications
and inefficiencies, including reduced cache locality when updating the leaf
nodes with a new sample depth.

This patch changes the region that the tree covers so that each leaf node of
the tree corresponds to exactly one or zero samples. To deal with the
power-of-two missmatch, we let parts of the tree "hang off" the edge of the
bucket unused.

Details:
* Many simplifications to the occlusion tree code due to the new
  single-sample-per-leaf design.
* Introduce an iterator for the samples held in a CqBucketProcessor to
  decouple the occlusion tree implementation from the details of the bucket
  processor sample storage scheme.
* Introduce some tests for the tricky position -> leaf index calculation in the
  internals of the occlusion tree.

1834. By pgregory

Fix a regression that could be seen in Shading/arraybounds_bug1812376.rib as black
dots on the right edge.

  * The caching wasn't taking into account that the bucket data region for buckets
    on the right and bottom edges could be different to the full buckets in the
    middle. This was causing a problem when the pre-calculated cache region sizes
    were too big, resulting in invalid pixels being used in the bucket.

    To overcome it, the best solution was to always set the DisplayRegion to be the
    full bucket size (plus filter expansion). The CqBucketProcessor always has enough
    space to store this much anyway, and all key processing is done against the
    DisplayRegion or SampleRegion so shouldn't have any impact on speed.

1833. By pgregory

Minor clarification to the ascii diagram for multi-jittering.

1832. By pgregory

 * Separate the code responsible for generating sample
   distribution patterns.

   The patterns are now provided via an interface
   IqSampler, that CqImagePixel will use to get 1D and
   2D sample data, and use those values for the position,
   dofOffset, time and lod.

   Currently the implementation is tied closely with the
   reliance on stratified samples, this may be addressed
   later should other elements of Aqsis require sample
   distribution data.

   Two implementations of the interface are currently
   available, CqMultiJitteredSampler and CqGridSampler.

   CqMultiJitteredSampler works by generating a large array
   of prejittered sampler patters, and choosing randomly from
   that list upon request. CqGridSampler is a static
   distribution, returns points on the subpixel grid for every
   call.

 * Change the sample initialisation loop in CqBucketProcessor
   to only initialise the pixels within the SampleRegion.

1831. By c42f

Fix a small bug committed in r2833 - limits.h was needed for UINT_MAX
on recent versions of gcc. I used UINT_MAX as a kind of "invalid value" but
wasn't clean or checked anywhere, so I've just changed it to 0 instead.

Branch metadata

Branch format:
Branch format 6
Repository format:
Bazaar pack repository format 1 (needs bzr 0.92)
This branch contains Public information 
Everyone can see this information.

Subscribers

No subscribers.