Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

NaliXL

OpenGL 2.0 shading language compiler?

This topic is 5922 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Feel a bit ashamed of asking this after living for half a year or so between OpenGL forums and code, but what is this? Okay, shading is the process of finding the right illumination for a triangle/quad/whatever, right? So the shading-language = I guess the GL instructions you can use to control this shading process, right? Then what is this compiler? After all, isn''t OpenGL all about libraries, and you using a compiler from any vendor? Thanks for clearing this up! PS : My apologies if my English is bad.

Share this post


Link to post
Share on other sites
Advertisement
It''s for vertex/pixel shaders. The idea is to have one language and one compiler so we don''t have to worry about using one of each from ATI and nVidia to stay compatible.

Share this post


Link to post
Share on other sites
Wait now you got me confused! Dose this mean theres gona be an OpenGL language for 2.0 and you wont be able to code OpenGL with C++?

Share this post


Link to post
Share on other sites
nVidia and ATI have both released their own versions of what they call "vertex and pixel shaders." These are programs run by a special processing unit on the ''GPU'' that perform specific instructions either on a per-vertex or per-pixel level. For example, one could write a vertex shader to create a transparent "shell" around a model like the Quad Damage effect in Quake III - though Quake III does this without vertex shaders, on the CPU. One could use pixel shaders to create a quality bumpmapping effect. You can go to the vendors'' websites (particularly nVidia''s) to see them brag about what their vertex and pixel shaders can do.

These vertex and pixel shaders are written in an ASM-like language and uploaded to the graphics card. Although the main program can be written in C++, the vertex shader still must be sent in a low-level form.

The creators of the "shader compiler" created a high-level language to describe vertex and pixel shaders. Their compiler creates GPU code from shader code written in this high level language.

You do not need vertex and/or pixel shaders in order to light your geometry using traditional vertex-lighting techniques, nor do you need them to perform texture mapping or any other standard technique. They are useful, and the shader compiler therefore seems useful because it appears to help you author them. However, since it sounds like you''re new to OpenGL, I''ll give you this advice: wait a bit before you use the vertex and pixel shaders. If you''re not and simply haven''t been keeping up with the lingo that the marketing people have been inventing, then I apoligise for misinterpreting your post.

I hope that answers your question.

Share this post


Link to post
Share on other sites
You could have a look at the hardcore game programming articles on gamedev about the vertex/pixelshaders...

They are for directx but maybe you get the idea when you read that

And with opengl 2.0 you still can use it with vc++.. the compiler where NaliXL is talking about is only for things like pixel and vertex shaders(you now, those new capabilities for the geforce 3/4 and the new ati cards)

As far as I now those instruction are still a little basic and are really compiled in another program.. but you can achieve very realstic and nice effects with them

[edit] I just missed TerranFury's post.. Is it really difficult to program with PS/VS? I now what they are and saw some pictures of what you can make with them but how difficult is it?

[edited by - Scheermesje on May 3, 2002 4:22:16 PM]

Share this post


Link to post
Share on other sites
Ah, now I think I get it. So within a while, NVidia and ATI will both release new OpenGL 2.0 compatible drivers, with a shitload of nice effects, compiled for OpenGL 2.0 with this shading language compiler? So this stuff is mainly for hardware manufacturers, isn''t it?

Share this post


Link to post
Share on other sites
Ok kool just wanted to make sure I could still use c++ and on linux.

thx for clearing that up!

Share this post


Link to post
Share on other sites
No, the stuff is not mainly for hardware manufacters..

The programmer who makes the program can use this instructions to acces the hardware more directly. But they are in a sort of ASM and need to be compiled..

Share this post


Link to post
Share on other sites
Okay, so I can create those effects myself, but I''ll need to know this assembler-like language? Hmm, I think I''ll have something new to study the next few months....

Share this post


Link to post
Share on other sites
Well, the intent of this is that eventually, you *won't* need to know the assembly-like language. You can write your shaders in this higher level language, and have it work on all hardware that supports it.

Oh, and it'll probably be a while before ATI and nVidia release OpenGL 2.0 compatible drivers. I'd guess that the spec is at least a year away from even being finalized. Part of the reason for 3D Labs releasing this compiler was to push things forward a bit.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!