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 :frowning: )/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?

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

Take a look at
There are some really nice tutorials!

The GeForce 6800 supports dynamic branching in the fragment shader.

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


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.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.