Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

Thread: Performance Issue

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2011
    Posts
    3

    Performance Issue

    Hey everyone!

    I have a performance issue with my program.
    I am using OpenGL and GLSL volume rendering to display a texture in real-time.
    (My shader also calculates the light sources)

    The problem is that my software runs really really slow on the computer while my CPU is mostly idle. Meaning the GPU processing slows down my system.

    The only thing that helps the performance is if i resize the window to a lower size and only then my computer starts to respond.

    I want to understand why? why when i resize the window to lower size it helps? Is it because the shader doesn't calculates all the texture box? I want to solve this problem and this is my only lead..

    Thanks in advance for your help!

  2. #2
    Advanced Member Frequent Contributor Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    943

    Re: Performance Issue

    The approach is quite simple. First, try to change the texture size. If frame rate changes significantly then your program is texture bound. I have no idea what you are actually doing with the texture, so it is better to eliminate a possibility of texture influence.

    Second, try to vary the number of GLSL commands in your fragment shader(s). If the frame rate changes then your program is fragment shader bounded (I bet on this). If the frame rate stays the same, your program is limited with the process of rasterization.

  3. #3
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Performance Issue

    http://www.opengl.org/wiki/Performance
    What are your hardware specs ?
    Volume rendering is heavy of per pixel operations, so this is expected.

  4. #4
    Junior Member Newbie
    Join Date
    Sep 2011
    Posts
    3

    Re: Performance Issue

    Thanks for the quick answers!

    I've read in wiki value on performance "http://www.opengl.org/wiki/Performance" -
    "If you are fragment processing bound, a really simple test is to reduce the size of the window you are rendering into down to the size of a postage stamp and see if your frame rate improves. If it does then you are at least partially fill rate limited - if it doesn't then that's not the problem. This is such a simple test that it should always be the first thing you try."

    Which is exactly what i am experiencing!!
    That means that my problem is probably in the Fragment Shader.
    Now my question is how can i improve the "fragment processing bound"?
    For example will these things help:
    1. Amount of text? Variables, Loops, Functions etc'
    2. What is the meaning of functions which are not in use? I have some functions that most of the time i don't use them. will it help to remove these?
    3. Loops efficiency? How can i improve them?
    4. any other ideas?

    I've also noticed a bit of improvement in performance when removing my per-pixel phong shading. Do you have any recommendations on that?

    Thanks again!

  5. #5
    Intern Contributor
    Join Date
    Sep 2010
    Posts
    74

    Re: Performance Issue

    Quote Originally Posted by Yahav
    The problem is that my software runs really really slow on the computer while my CPU is mostly idle. Meaning the GPU processing slows down my system.
    This is not true, in general. There are often other bottlenecks than CPU and GPU processing. In your case it most likely is the GPU computations that are the bottleneck (as others have said).

  6. #6
    Junior Member Newbie
    Join Date
    Sep 2011
    Posts
    3

    Re: Performance Issue

    Regarding spec i have -
    Intel® Core™ i7-2630QM processor
    1.5GB GDDR5 NVIDIA® GeForce® GTX 460M card
    and 8GB DDR3 1333MHz memory

  7. #7
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,713

    Re: Performance Issue

    You haven't told us what it is that you're trying to draw that's so slow. Being fragment processing bound means that you're drawing more stuff than the GPU can handle. We can't help you unless we know what you're trying to draw, what your shaders are, etc.

  8. #8
    Junior Member Regular Contributor tksuoran's Avatar
    Join Date
    Mar 2008
    Location
    United Kingdom
    Posts
    200

    Re: Performance Issue

    You are fillrate limited, and you likely have a lot of overdraw - which may be your key problem. If you can somehow reduce the overdraw, that would help. Could you do ray tracing in fragment shader instead of doing many passes?

  9. #9
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Performance Issue

    Or reduce the rendering resolution when being interactive, which is fairly common in volume rendering.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •