Best way to process lists?

Hi there,

I am currently working on a 2.0 shader which should iterate through a list (list = data stored in a texture).

Do best practises exist for such work? Is such complex stuff even possible with ps-2.0 shader cards?

My problem seems to be that:

  • Howto iterate if dynamic branching is not supported?
  • Howto start at an index, if another pixel bevore the current already consumed an entry of the list?

Thank you in advance, lg Clemens

If dynamic branching isn’t supported, you’ll have to unroll the loop. The loop should cover a small range (say, 1/16th for a 4x4 pixel kernel) of the total list. Each pixel then determines its base index based on its location, and adds that to the loop range. It then can compute it’s own chunk of the list.

Check out . They have some tutorials on list processing there.

Cool, thanks a lot :slight_smile:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.