Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualMeltac

Posted 13 November 2012 - 07:23 AM

Hi everybody

There are many situations were I need to process an array / grid / matrix of pixels in a loop in a post process, mostly for calculating some mean or maximum value or a gradient of a certain set of adjacent pixels. Examples:

  • Gaussian blur filter
  • Calculating mean luminance of a specific area on the screen
  • Getting pixel nearest to the viewer within a certain range
  • Checking if at least one pixel of a 2-dimensional array (rectangle) of pixels meets a certain condition
  • etc.

All these applications are typically processed in a 2-dimensional for-loop iterating through the x- and y-axis (rows and columns) of the specified grid, where each iteration makes at least one texture lookup. Therefor they cause heavy GPU load as soon as their dimensions exceed a certain limit, making FPS drop dramatically in many situations.

So, are there strategies to speedup execution times immensely to overcome this limitations? I've already tried these:


But that's way not enough to make my shaders run well. Are there any better approaches, or maybe some special DX10/11 instructions being of help here?

#3Meltac

Posted 13 November 2012 - 07:22 AM

Hi everybody

There are many situations were I need to process an array / grid / matrix of pixels in a loop in a post process, mostly for calculating some mean or maximum value or a gradient of a certain set of adjacent pixels. Examples:

  • Gaussian blur filter
  • Calculating mean luminance of a specific area on the screen
  • Getting pixel nearest to the viewer within a certain range
  • Checking if at least one pixel of a 2-dimensional array (rectangle) of pixels meets a certain condition
  • etc.

All these applications are typically processed in a 2-dimensional for-loop iterating through the x- and y-axis (rows and columns) of the specified grid, where each iteration makes at least one texture lookup. Therefor they cause heavy GPU load as soon as their dimensions exceed a certain limit, making FPS drop dramatically in many situations.

So, are there strategies to speedup executio timesn immensely to overcome this limitations? I've already tried these:


But that's way not enough to make my shaders run well. Are there any better approaches, or maybe some special DX10/11 instructions being of help here?

#2Meltac

Posted 13 November 2012 - 07:22 AM

Hi everybody

There are many situations were I need to process an array / grid / matrix of pixels in a loop in a post process, mostly for calculating some mean or maximum value or a gradient of a certain set of adjacent pixels. Examples:

  • Gaussian blur filter
  • Calculating mean luminance of a specific area on the screen
  • Getting pixel nearest to the viewer within a certain range
  • Checking if at least one pixel of a 2-dimensional array (rectangle) of pixels meets a certain condition
  • etc.

All these applications are typically processed in a 2-dimensional for-loop iterating through the x- and y-axis (rows and columns) of the specified grid, where each iteration makes at least one texture lookup. Therefor they cause heavy GPU load as soon as their dimensions exceed a certain limit, making FPS drop dramatically in many situations.

So, are there strategies to speedup executio timesn immensely to overcome this limitations? I've already tried these:


But that's way not enough to make my shaders run well. Are there any better approaches, or maybe some special DX10/11 instructions being of help here?

#1Meltac

Posted 13 November 2012 - 07:20 AM

Hi everybody

There are many situations were I need to process an array / grid / matrix of pixels in a loop in a post process, mostly for calculating some mean or maximum value or a gradient of a certain set of adjacent pixels. Examples:
  • Gaussian blur filter
  • Calculating mean luminance of a specific area on the screen
  • Getting pixel nearest to the viewer within a certain range
  • Checking if at least one pixel of a 2-dimensional array (rectangle) of pixels meets a certain condition
  • etc.
All these applications are typically processed in a 2-dimensional for-loop iterating through the x- and y-axis (rows and columns) of the specified grid, where each iteration makes at least one texture lookup. Therefor they cause heavy GPU load as soon as their dimensions exceed a certain limit., making FPS drop dramatically in many situations.

So, are there strategies to speed execution immensely to overcome this limitations? I've already tried these:
But that's way not enough to make my shaders run well. Are there any better approaches, or maybe some special DX10/11 instructions being of help here?

PARTNERS