-
adding rows together
Hi
I am using GLSL code to add the rows of a texture together.
So i take an nxn sized texture and make it a 1xn texture.
what is the easiest way to do this?
at the moment im using a for loop to do it. but for larger sized textures this is going to be slow.
Thanks
-
-
Member
Regular Contributor
Re: adding rows together
If you want to reduce a large texture to 1xN or Nx1 you should always use a two-pass approach because GPUs typically process 2x2 fragment blocks. With a 1-wide render target you lose half the performance, so you want to perform the bulk of the work in a pass that uses a slightly larger render target. Also make use of texture filtering to reduce the number of texture fetches.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules