I'm writing a (german) introduction for glSlang, as a kind of a huge tutorial on that matter. And for this I wanted to also write a simple example to show and explain my readers a basic shader, but I directly ran into problems, as the following (simple) shader exceedes the maximum number of texture indirections :

Since the Radeon is supposed to support far more than only four indirections, I'm a bit surprised, especially because I'm doing only one texturesample per texture unit.
Texturesamplers are set as follows (via glUniform1iARB in my App) :

If it works with ARB_FP it seems to be a bug in GLslang compiler. That's possible because their implementation has some major bugs yet.

PS: Where are you going to publish your german introductions to GLslang. I'm interested in it. If you need some help, mail me.

PanzerSchreck

12-25-2003, 06:11 AM

Thx for your quick response, so it really seems like a problem with the current glSlang-implementation in ATI's drivers.

I've also noticed that it works with three reads (without sampling tmu3), so I'll use that for the sample in my introduction.

@Introduction :
I'm a mod at the Delphi OpenGL Community over at http://www.delphigl.com and I'm also writing for them (and also was responsible for the gl1.5-Delphiheader along with two other people from the team). So I came up with the idea of a big german introduction to glSlang, that not only includes how to load glSlang-Shaders in Delphi, but also discusses the aspects of the glSlang-Language along with samples. I started yesterday an already wrote about 25 pages in a non-stop 14 hour typing-frenzy, so I don't need any help there at the moment.

The only thing right now that's missing is a small sampleshader that I'll also discuss in that introduction (as I said before).

The introduction will be posted around first or second january next year, and if demanded I'll also announce it here. But remember that it'll only be in german, translating it to english would be a big effort, and since we're a community more aimed at the german audience wouldn't make much sence right now.

[This message has been edited by PanzerSchreck (edited 12-25-2003).]

Corrail

12-25-2003, 06:33 AM

25 pages... *uff* Great! :-)

With german language I don't have any problems (I'm Austian... :-). But if that's ok for you I'm interested to translate your paper to C++ (and maybe to English).

PanzerSchreck

12-25-2003, 06:44 AM

It'll be about 30 pages (some more or less) in the end, cause of the example and I'll also show some nice screenshots of some shaders (people don't really like something until they see shiny and blinking Screenshots http://www.opengl.org/discussion_boards/ubb/wink.gif ).

A translation to C wouldn't be necessary I think, cause most of the text deals with glSlang itself and that shouldn't change across languages. There's only one paragraph where I show how to load the shader in Delphi using our header and that too shouldn't be too different from C http://www.opengl.org/discussion_boards/ubb/wink.gif

And as for the translation into english : Thx for your intereset, but our team decided not to translate our contents to english as of now, but that may (hopefully) change within the future. But my english is good, so I'll then do that by myself.

Thx man! That workaround was what I needed right now.
Guess I'll report it to ATI's devrel, since I've already registered with them, but before sending such things to them, I'd like to clear if it's really a problem and not my fault http://www.opengl.org/discussion_boards/ubb/wink.gif

Zengar

01-01-2004, 11:58 PM

Maybe I'm blind, but I don't see any dependent texture read in the shader.Could you enlight me?

PanzerSchreck

01-02-2004, 01:10 AM

No, you're not blind http://www.opengl.org/discussion_boards/ubb/wink.gif The problem with ATIs current glSlang-Implementation is, that it mistakes normal texture reads for independet texture reads. So this will hopefully get fixed in a future revision.

PanzerSchreck

01-12-2004, 07:44 AM

Just in case anyone is still interested, go here (http://www.delphigl.de/dgl/glslang.html) to read my german introduction on glSlang. It's rather long and it's aimed at delphi coders, so you'll find many places where I tell some important differences between Delphi and C-Syntax. I've also tried to deliver as many samples on the usage of glSlang-functions as I felt like the specs are missing them.

[This message has been edited by PanzerSchreck (edited 01-12-2004).]

Jan

01-12-2004, 12:11 PM

I have to say, that the tutorial is really great. Itīs quite complete, and very easy to read and understand.
Really good work !

However you should let someone check the paper for grammar-mistakes, there are quite a few...

Jan.

Relic

01-13-2004, 02:35 AM

The uniform handling is unsafe. You do not check if you get a valid location. This will produce GL errors in case uniforms are inactive.
I suggest to add a rock solid error checking tutorial for loading, compiling, linking and uniform handing.
(The HTML formatting didn't adjust to the window width for me.)

PanzerSchreck

01-13-2004, 03:05 AM

@Jan2000 :
If you have ever written a huge tutorial (or whatsever), you most likely don't have the motivation to read through it several times again just to find grammar-mistakes (since I already did that for spelling mistakes). But I'll try to read over it again to eliminate those grammar mistakes if I can get my lazy self to do that http://www.opengl.org/discussion_boards/ubb/wink.gif

@Relic :
That's true. But I suppose that most people using glSlang know how to spell their parameter names and also are aware of this. But thanks for that hint, I'll add a small paragraph on that matter. And for the wrong HTML-Formatting : It's because of some very long lines of code that don't get split. I'll try to fix that.

[This message has been edited by PanzerSchreck (edited 01-13-2004).]

Ffelagund

01-13-2004, 03:21 AM

there are any posibility to get your tutorial in English (or Spanish... http://www.opengl.org/discussion_boards/ubb/smile.gif ). do you have plans of translate it?

PanzerSchreck

01-13-2004, 03:33 AM

Originally posted by Ffelagund:
there are any posibility to get your tutorial in English (or Spanish... http://www.opengl.org/discussion_boards/ubb/smile.gif ). do you have plans of translate it?

No. As of now I have no plans to translate it into any other language (besides that, I don't speak a single spanish word). But an english version of this may come in the future. So if you're not able to read german, then just go for the shader specs (see 3DLabs' page for more).

[This message has been edited by PanzerSchreck (edited 01-13-2004).]

veal

01-19-2004, 02:27 AM

those of you not understanding german i
suggest to read the OpenGL Shading Language (http://www.opengl.org/documentation/oglsl.html) paper from the opengl.org frontpage... most is written there too (except the examples)