Reduction: many texel lookups VS Multiple renders

This topic contains 1 reply, has 2 voices, and was last updated by  marco 5 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30961

    WonwooLee
    Member
    Hello. 
    I’m currently implementing a kind of reduction. 
    Generally the reduction is conducted by rendering rectangles multiple times, by reducing their size in the order of 2. 
    I have to sum values in each 11×11 patch in a texture. 
    My basic implementation was computing horizontal sum for 11 texels, and then do the same thing in vertical. 
    However, reading 11 texels in a fragment shader is slow as known in general. 
    In this case, could I improve the speed if I do the sum in a typical way ?
    (By putting a 11×11 patch to a 16×16 patch and performing rendering multiple times)
    Actually, both methods seem not much different in computational complexity to me.
    #36126

    marco
    Member

    Hi WonwooLee,

    did you have a look at the Bloom training course from our SDK?
    In there we optimize the amount of texture fetches by using the filtering capabilities of the texture units.
    If your filter coefficients allow it, then you can save quite a few texture lookups that way.

    Do you require a 11×11 kernel to downsample your image?
    You will be most likely bandwidth bound depending on your input image size.

    Best regards,
    Marco

    marco2012-09-04 17:00:30

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.