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

Thread: a couple of simple questions

  1. #1
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,407

    a couple of simple questions

    (background info)
    i havent really touched a computer for over a year (been on the road, which i still am thus have no fixed internet conection though the town im in at present has free internet thus i can do a bit, download files (not *.zip though they're banned) to chuck on the computer i have where im staying).
    i have a gf-fx5200.
    i downloading glsl yesterday first time ive delved into more advanced shading than nv_register_combiners and its beautiful.

    anyways some questions

    A/ the nvidia drivers dont seem to support looping (i get parsing errors with while or for), is this cause the hardware is not capable of this or hasnt it been added in yet?

    B/ what are the best sites for further info, ive been to 3dlabs/nvidia developer (sdk to large though )/ati/humus are there any others? sorry to ask a question that can be found out with searching but i dont have the luxury of unlimited internet access

    C/ i notice the new radeons seem to support textures of greater than 8bit, but i cant see any such function with my gf-fx5200 is it cause the hardware aint capable or cause its not yet exposed?

    D/ why isnt doom3 out yet?

  2. #2
    Intern Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    46

    Re: a couple of simple questions

    Hi, at the moment the cards dont support true branching, so they are unrolled at compile time, if statements can be used, and function calls, all for and while loops however must have constant numbers of iterations to be unrolled by the compiler (annoying!)

    check out CG Shaders , run by nvidia. nvidias site i think is very good. a copy of the book the cg tutorial should explain a lot, also nvidias cg manual that comes with cg is quite explanative.

    the new cards are actually capable of full 32bit precision (*4 for 4 channels = 128bit)throught the pipeline (high end ones) although not fully exposed yet. you can have 8 or 16 bit standard textures. there is an NV_float_buffer extension that exposes the floating point engib=ne for textures and pixel buffers, however there are limitations. these have been ironed out for the upcoming geforce fx 6800 range of cards

    dunno about doom3

  3. #3
    Member Regular Contributor
    Join Date
    Apr 2002
    Location
    Austria
    Posts
    328

    Re: a couple of simple questions

    Take a look at
    http://www.clockworkcoders.com/oglsl/
    There are some really nice tutorials!
    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...

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2003
    Posts
    29

    Re: a couple of simple questions

    The GeForce 6800 supports dynamic branching in the fragment shader.

  5. #5
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,407

    Re: a couple of simple questions

    ok i managed to get looping working and yes i think it was the unrolling that was the cause of the problem, as i was wanting to early exit from the loop. shaders are quite easy to use had a bit of trouble last night getting multitexture to work but sussed it out eventually gotta use glUniformi..(..) or something

    also just out of interest are there any papers that detail the 'rough' relevant expenses of various operations, eg distance(..) i found out was expensive. but others inversesqrt(..) were cheap

    oh yes it seems the drivers/parser is still quite imature eg from last night (from a large shader)

    vec4 col(0.5,0.5,0.5,1)
    frag_col = A * col // == grey good

    vec4 col(1,1,1,1)
    frag_col = A * col // == red!! (1,0,0,1) BAD

    vec4 col(0.999,0.999,0.999,1)
    frag_col = A * col // == white good

    teething problems

    cheers

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Oct 2001
    Posts
    596

    Re: a couple of simple questions

    vec4 col(1,1,1,1) should be an error.
    vec4 col(1.0,1.0,1.0,1.0) is the correct way of doing that.

Posting Permissions

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