Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: 2 questions: sqrt and opengl languages

  1. #1
    Junior Member Regular Contributor
    Join Date
    Jan 2002

    2 questions: sqrt and opengl languages

    My first question:
    I want to use a sqrt function in my fragment program. Is it really slower than a simple op like + or * ? I mean, does it worth doing a precomputed table I would access when I need a square root, or can I use the sqrt function and don't care about a possible slow down ?

    My second question:
    What is GLslang ? is it Opengl Shading Language (as described in the spec about "Opengl Shading Language" or is it another language ?
    More generally, what do you think about the different languages dealing with fragment programs in opengl ? (like GLslang, Cg, etc..)

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2002

    Re: 2 questions: sqrt and opengl languages

    Yes, sqrt may take longer than a simple addition or multiplication.

    GLslang (or GLSL, ...) is the OpenGL Shading Language defined by 3DLabs.

    GLslang - future high level OpenGL shading language, no assambly suppport, quite beta status (still some bugs in different implementations)
    Cg - nVidias high level shading language, similar to DX HLSL
    ARB_*_progam - assambly shaders

    I think that GLslang is the best choice. It has some disadvantages like no assambly support (shaders are sometimes harder to optimize) and some others. e.g. working with matrices is quite hard for some applications (see Further the sampler handling ist quite ugly. But nevertheless there are many other very nice features supported by GLslang.
    Additionally I hope that there will be new versions of ARB_*_program too!
    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

    There is another theory which states that this has already happened...

Posting Permissions

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