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

Thread: PS 3.0

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2004
    Posts
    17

    PS 3.0

    everyone seems to say that PS 3.0 (which is only for Direct3D right?) is a giant leap forward in shader technology. How does it compare with GLSL? What are the pros and cons of each (aside from the obvious)?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Portugal
    Posts
    214

    Re: PS 3.0

    PS3.0 is more of a target to HLSL. Since GLSL doesn't need "targets", you can except the driver to automaticly take advantage of the hardware (being or not ps3.0). Even tought I believe there is a ARB_vertex_program_2 and ARB_fragment_program_2 on the way. Don't know if ARB_vertex_program_2 will have texture access...

    In fact, any word regarding these two?

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2004
    Posts
    17

    Re: PS 3.0

    so PS 3.0 is a version of the hardware that the HLSL shader is running on?

  4. #4
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,932

    Re: PS 3.0

    You can do with HLSL everything you could do with PS 3.0

  5. #5
    Junior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    Portugal
    Posts
    214

    Re: PS 3.0

    Well, PS3.0 is more about branching and loops and some aditional instructions. Those are available on GLSL. But if either runs slow (not ps3.0 hardware) or runs fast (without ps3.0 hardware).

    For example, an if or for statement gets compiled more eficently on ps3.0 cards rather then on ps2.0 hardware.
    And of course, some instruction aren't supported at all, making the card fall to software.

    Either way, ps3.0 is the assembly interface. HLSL "targets" a pixel shader version. GLSL doesn't (in the same sence). Using GLSL makes it transparent coding for ps2.0 or ps3.0 hardware. HLSL does it to but is more dependent on the shader version as targets.

    Sorry, can't explain it any better...

  6. #6
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,264

    Re: PS 3.0

    For example, an if or for statement gets compiled more eficently on ps3.0 cards rather then on ps2.0 hardware.
    And of course, some instruction aren't supported at all, making the card fall to software.
    This is not guranteed to be true. You can't make statements about performance without refering to a peice of implementation.

    everyone seems to say that PS 3.0 (which is only for Direct3D right?) is a giant leap forward in shader technology. How does it compare with GLSL?
    All that can be said is that GLSL is a C like language with build in functions.
    It doesn't care what the hw can do.
    You might say that it is ps infinite.0 capable, vs infinite.0 capable

    ps3.0 is more about what the hw can actually do.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  7. #7
    Intern Contributor
    Join Date
    Apr 2004
    Location
    Bellevue, WA
    Posts
    73

    Re: PS 3.0

    Yes, however GLSL is also focused on what the hardware could do (at the moment PS3.0 type capability). It's just higher level than assembly, which Microsoft provides and OpenGL doesn't (at the moment...). In fact, OpenGL just leaves more up to the driver, which in the past has been a strength of OpenGL (can you choose a specific version of assembly to compile to?).

    GLSL is only PSinfinite.0 compatibile if they add an extension mechanism and keep revising the spec. In the end, they all need to be updated, and there isn't that big a difference between them, except that GLSL tries to be "forward looking" where Microsoft sets the entire spec based on immediate demand (and it's becoming less cludged, which is why it's so dangerous to opengl).

Posting Permissions

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