OpenGL Shading Language book 02/20/04

Any comments on this book:
http://www.aw-bc.com/catalog/academic/product/0,4096,0321197895,00.html

When will OpenGL 1.5 or OpenGL 2.0 book be available? I have downloaded the 1.5 spec.

Regards,
Ben

I am not sure if any one is using HLSL w/ open gl. Only ATI provides drivers, and from what I read it is quite buggy.

Add to the problem that will be slower most likely than what people use now, reg combiners,
fp, etc.

Perhaps I am wrong about this. What do people think? Is HLSL/GL_slang worth it?

GLSL is definitely worth it. Once you’ve tried a high level shading language you’re not going back to assembly. In my experience though, the ATI driver is very stable and works very good. The only thing is that there are some stuff that isn’t implemented yet.

As Humus already said, glSlang is worth it. I’m using it intensivley since ATI first implemented it in their drivers, and it’s a real joy to write shaders in such a good thought out HLSL. A HLSL not only makes shaders easier to write, it also let’s you maintain them easier and let’s you implement them faster. I for myself wont’ miss that anymore.

But yes, speed is a problem right now. I wrote a small demoapp for bumpmapping that uses three different rendering-paths (fixed function, ARB_VP/ARB_FP and glSlang), and the glSlang-path is a good deal slower than the other twos.

But since ATI’s implementation still is in developement, and as the next chips are round the corner, I’m quite sure that this situation will get better (even on current HW).

I Second that. After nearly getting desperated trying to write a reflection function in ARBvp; I finally wrote that part in CG within 5 minutes and inserted the ASM code.
Now I switched completely to CG. I’ll give GLSLANG definitly a try when I get drivers for my FX5600 Go Meanwhile I’ll stick to CG.

What about older hardware. For example Nvidia
Geforce 4, 3. ATI 8500. How will glslang work with them. Reduced functionality. Reduced speed. According to what I read, the best speed
on gf 4 and older is using reg combinders.
Anybody have some info?

Agree with the “worth it” comment. I’ve been using Cg on a GeForceFX 5900 … very pleased.

I’m just confused why the ARB went with the 3D Labs solution since nVIDIA already had a working solution on multiple platforms and OSs. Politics I guess.

And, which will be the de factor standard for OpenGL – OGSL or Cg? I suppose having multiple solutions will at least give insight for the near-term :{

Nonetheless, I was wondering if anyone had comments on the book; was anyone a reviewer?

And, which will be the de factor standard for OpenGL – OGSL or Cg?

There is no “de facto standard” for OpenGL; the ARB has spoken. Glslang is what they decided on.

Cg relys on OpenGL extensions. For the ARB profile, it relies on ARB_fp/vp. Which is why it doesn’t support looping in the vertex program ARB profile; ARB_vp doesn’t support it either. The features of Cg are defined by the profile. As such, Cg has a problem; the ARB isn’t going to update ARB_vp/fp with new assembly languages for various features. Only glslang will be updated. Without a glslang profile for Cg, the language will quickly become unusable for advanced OpenGL programming.

I expect ARB_vp and ARB_fp will see further extensions or revision.

Uuuuhhh! Such an old cover!!! They only changed the title!

Well, well…

Anyway, i tried ARB_fp and glSlang. glSlang really is a joy. It is much more readable and it is much faster to do stuff with it.

The ARB_fp-implementation might be faster at the moment, but that will certainly change soon.

As the complexity and the length of shaders increases, there is no other way than a high-level language as glSlang or CG.

Jan.

Originally posted by brcain:
[b]Any comments on this book:
http://www.aw-bc.com/catalog/academic/product/0,4096,0321197895,00.html

When will OpenGL 1.5 or OpenGL 2.0 book be available? I have downloaded the 1.5 spec.

Regards,
Ben[/b]

Semi off topic question, but…
I have purchased the redbook 1.4 and i am very very displeasured with these book.
It lies about it’s content. At the back side of the book says: “Most importantly, the ARB vertex and fragment program extension is introduced. Many new example programs have been incorporated”. It is a lie. The book does not have any reference to ARB shaders nor any shader example program. This version is equal than redbook 1.2 with two addons (texenv and point parameters). Don’t buy it if you have the redbook 1.2

Originally posted by Ffelagund:
Semi off topic question, but…
I have purchased the redbook 1.4 and i am very very displeasured with these book.
It lies about it’s content. At the back side of the book says: “Most importantly, the ARB vertex and fragment program extension is introduced. Many new example programs have been incorporated”. It is a lie. The book does not have any reference to ARB shaders nor any shader example program. This version is equal than redbook 1.2 with two addons (texenv and point parameters). Don’t buy it if you have the redbook 1.2

This is the same impresion I got. After some years with 1.2 edition, I was really dissapointed with the 1.4 edition. Not only the new features are briefly commented but also if you donwload the examples from the web-site that appear on the book, you can’t compile them on windows if you don’t know how to obtain the extensions headers, how to load function pointers, … Not really a good book if you want to learn OpenGL. Bad work.

Originally posted by maximian:
What about older hardware. For example Nvidia Geforce 4, 3. ATI 8500. How will glslang work with them. Reduced functionality. Reduced speed. According to what I read, the best speed
on gf 4 and older is using reg combinders.
Anybody have some info?

Could someone please anwser this. I’ve read about this one a few threads but the information I got ranges from “no, it won’t work” to “with reduced functionality” and even “multipass”. So I would like an anwser from someone with a bit more info on this.

It won’t happen, since neither the GF3/4 nor Radeon8500 (and all cards based on it, like the 9000/9100/9200) have the needed hw-caps. And emulating all needed functions in SW would be far to slow. So in general you can say that there won’t be glSlang on cards that don’t support ARB_VP AND ARP_FP.

Originally posted by PanzerSchreck:
It won’t happen, since neither the GF3/4 nor Radeon8500 (and all cards based on it, like the 9000/9100/9200) have the needed hw-caps. And emulating all needed functions in SW would be far to slow. So in general you can say that there won’t be glSlang on cards that don’t support ARB_VP AND ARP_FP.

Look for it to be implemented in Mesa. http://sourceforge.net/mailarchive/forum.php?thread_id=3800019&forum_id=5154

Nothing against mesa, but as I said : A pure software-implementation of glSlang won’t be much fun at all. It’ll be good for testing and so on, but no real alternative to a full (or partialy) HW-implementation.

major issue, and the main reason glslang will never make it onto gf3/gf4/r8500 is the precicion. glslang uses float-like variables. it doesn’t care if its fp16,fp24,fp32, or what ever… but sorta fp it has to be…

gf3/gf4 has values in the range -1…1, the r8500 in the range -8…8 (if i’m right).

they are not usable to “do the job of floatingpoint variables”…

the other is the (espencially for gf3/4) lack of texture programability. the texture_shaders are just some fixed setup for some mix of fixed texture samplers…

implementations wouldn’t worth the effort.

with multipass, most could be done… if the precicion/range would be there… but it isn’t.

Originally posted by brcain:
I’m just confused why the ARB went with the 3D Labs solution since nVIDIA already had a working solution on multiple platforms and OSs.

Maybe because it was the better solution?