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 5 of 5

Thread: Shaders: where to start?

  1. #1
    Intern Newbie
    Join Date
    Jun 2005
    Posts
    42

    Shaders: where to start?

    I don't know if I should go with cG or the OpenGL shader language. Or if I should hold off on the shaders for a bit. I'm assuming they both have the same hardware requirements, can a geForce4 run these ok? Specifically, I'm interested in rendering terrain with some texture blending. Is this going to be faster on my older card using multitexturing or a 3d texture than a shading language?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    France
    Posts
    114

    Re: Shaders: where to start?

    Or if I should hold off on the shaders for a bit.
    I don't think so =)
    seriously, shaders are VERY interesting to develop, just go for it

    GLSL won't run on on gf4 (geforce fx and radeon 9500 are requiered).
    As far as I know, cg will most certainly run on this hardware, because cg compiler convert and adapt your code to your hardware. It means your shaders will use register combiners on old nvidia hardware.

    Considering performances, it wont be faster than multitexturing or 3d texture, especially on rather old hardware. In a general way, don't use shaders to reproduce existing features, as the fixed pipeline is higly optimised, performance wont be beaten with shaders, most of the time

    hope it helped
    wizzo
    You snooze, you loose

  3. #3
    Intern Contributor
    Join Date
    Mar 2004
    Posts
    50

    Re: Shaders: where to start?

    You may want to do a combination of both. While Cg runs on older hardware, it is proprietary in nature and vendor controlled. GLSL needs newer hardware, but is fully portable across platforms and allows the developer to use the shader(s) on any hardware providing a compliant implementation.

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,768

    Re: Shaders: where to start?

    More importantly, running Cg fragment shaders on old hardware (GeForce 4 and prior) is not easy. You can't just write any old shader and expect it to work. Effectively, you have to live within the restrictions of the hardware: register combiners & texture shaders. You have to code using special intrinsics that call texture shader routines, and use only the math operations that register combiners support.

    In short, it's a pain. And it's probably not worthwhile to bother.

  5. #5
    Intern Newbie
    Join Date
    Jun 2005
    Posts
    42

    Re: Shaders: where to start?

    Thanks, that's a lot of help. I'd love to start on shaders now but it is important to me to use a standard, platform-independant, non-proprietary language with lower system requirements. I'll skip shaders on my first little game, I do have a lot I want to learn in the meantime.

Posting Permissions

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