Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: lighting...

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    570

    lighting...

    I'm trying to put together a Vertex and fragment shader that just do what the 1.5 pipeline does.

    I can't seem to get the same performance out of my vertex shader when computing lighting as OpenGL (I'm using a straight copy out of the orange book for my lighting calculations).

    I'm on a 5950.

    has anyone implemented lighting (with multiple lights) and gotten basically the same performance as OpenGL fixed?

    any ideas how to optimize and what built in uniform varibles I should make use of?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Oct 2000
    Location
    Montreal, Canada
    Posts
    106

    Re: lighting...

    I don't really have a solution to your problem. All I can say is despite all my efforts, terrible performances on me 5900 when I use a fragment shader or a fragment program, even if it's a simple one.

    The Radeon is much better for the shaders. I can't wait to see how the GeForce 6800 will be.

  3. #3
    Junior Member Regular Contributor
    Join Date
    May 2003
    Location
    Germany
    Posts
    229

    Re: lighting...

    You won't for now get the same performance as the FFP. And besides this, most modern cards nonetheless don't have a FFP anymore but emulate it via shaders.

    But you need to remember that all glslang-implementations out there are still in beta-stage, and in that stage it's bug-finding before speed-optimization. I for myself have made a simple bump-mapping scenario where I do the bump via an ARB-shader and a glslang-shader, and the ARB-shader (although doing nothing more or less) is faster by a good amount. But as the glslang-implementations mature, the speed will get faster and hopefully get as fast as ARB-shaders (at least on current hw. My 9700 is significant slower on glslang than on a similar ARB-shader).

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    570

    Re: lighting...

    vince, I've had the chance to run my shader on an NV40 and I can tell you that it ran just about in real time. the NV40 is some serious $hit!

  5. #5
    Junior Member Regular Contributor
    Join Date
    Oct 2000
    Location
    Montreal, Canada
    Posts
    106

    Re: lighting...

    Aeluned, you lucky bastard! I wanna try one of those cards too. Do you know when they are supposed to release them?

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    570

    Re: lighting...

    I can only speculate...and don't quote me on this, but I think they may become widely available sometime in July.

  7. #7
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    807

    Re: lighting...

    What's the point in using a shader if you want it to do exactly the same thing as the fixed-function pipeline?

    -- Tom

  8. #8
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    601

    Re: lighting...

    I think the GeForceFX has some fixed function vertex processing hardware in addition to the vertex shaders. The reason is (I'm guessing) to get good performance in professional CAD like apps which often are very geometry limited.

    Besides, even if there wasn't any fixed function vertex processing hardware, if you're using fixed function the drivers can used special hand tuned assembly shaders done specially for each hardware model for optimal performance. I doubt nvidias shadre compiler beats nvidias driver engineers.

  9. #9
    Advanced Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    570

    Re: lighting...

    Tom -
    unless I'm missing something, If I write a vertex shader and I want lighting I'm going to have to implement it. I'm not trying to recreate the whole FFP, but I do need to recreate that part of it.

  10. #10
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    807

    Re: lighting...

    Okay, but that's different from what you originally said

    As harsman already stated, the fixed-function stuff may run on dedicated hardware, whereas your shader has to go through the more general programmable pipeline. It seems perfectly reasonable to me that the added flexibility costs you some performance.

    Just how big is the performance gap you're trying to close?

    -- Tom

Posting Permissions

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