What is GLSL? (don't hurt me!)

Ok, i’ve been playing with blender for a while, but only after i joined the forum have i heard of this term. What is GLSL, and what are its benefits?

Google is your friend: http://en.wikipedia.org/wiki/GLSL :rolleyes:

It is a “Guru only” feature,

It allows people who are adept in the C programming language to access the graphics hardware at the lowest level.( I may be wrong about this)

I think they sometimes call it GLslang.

something nice would be if some gifted python scripter could make so things like Paralax and normal map shader are available for non-programmers…

a gui that allows the user to select a object, and in the script assign the bumpmap, normalmap, specular map, and color texture from the blender material system.
After everything is assigned, the script poops out the appropriate code for the object and makes it all ready for the user to view in the game engine.

or perhaps have it all done automatically like the Blender2Crystalspace exporter :stuck_out_tongue:

For noobies starting out I highly recomend CS over the internal blender game engine. The only time I say go with the blender game engine is if you are somewhat adept at python programming.

Without any programming language experience you can make nice worlds, and be walking around in them with a few clicks. With nice bumpy shaders !!!

is crystalspace freeware? 'cause i despise buying stuff when i can get an equivalent for free.

http://www.opengl.org/documentation/glsl/

I think it’s useable for cards fully supporting opengl 1.4 and up (geforce fx etc) but I aint a coder so - seek more info elsewhere.

Hi RagMan,

Even better, it’s a free software. You can make levels for it in Blender and there are nice tools available to help you in the proccess. Recently I wrote a bit about Blender->Crystal Space in the Ubuntu forums with some links to the relevant information and packages, maybe you want to have a look at my post.

Sanne

but what does GLSL in blender allow you to do?

It allows you to create and use Pixel Shaders in Blender GE. Currently I think it goes up to the pixel shader 2.0 standard. With it you can do things like realtime normals mapping etc. It works by allowing you to specify how a model is lit on a per-vertex or per-face basis. See the latest blender builds and test demos to see this in action. GLSL is very complex to code in though, and yes, you really need to know your C++.

is crystalspace for mac too? cuz if it’s not then…:mad:

But blender already has per-vertex/face lighting. I have seen the test demos, the bump mapping is something new, but I dont see anything new in the rest of the demos. They just seem to have a bunch of reflective surfaces (already available in blender)…Also, doesnt blender use python scripts and not C++?

The GLSL shader is stored in a python string (the bits contained in FRAG = “”", see the bumpmap examples). The shaders in the new blender test demos are actually combinations of python and GLSL language. The GLSL strings define the shader, python takes that shader and applies it to your object in the GE.

You can’t set up ‘in game’ bumpmapping in blender GE without using a shader written in GLSL. GLSL is not actually C++, just the syntax is similar. I think crystal space and OGRE also use GLSL (or something very similar).

Basically, yes, it does the same kind of thing that Blender’s materials do, but also offers more possibilities than what can actually be achieved with materials alone.

MAYBE THIS WILL BECOME IN HANDY

http://www.typhoonlabs.com/

I do beleive it stands for “GLide Shader Language” when I looked into it. Basically the language your OpenGL cards can understand. Anyone can write shaders, and you can make use of the code in your OpenGL games. ATI (and nVidia?) has a good shader development program called rendermonkey. It’s been a while since I looked into it, so all this information could be wrong.

pf

edit if you’re still going “so what are they good for?”, take a look at some BF2 screenshots (particularly the water). Anyone who has played the game with a 2.0 GPU will tell you the water looks awesome. This is the use of shaders.

aargh!! ok, so it’s totally freakin’ awesome, but how do i implement it!! what is the syntax, and exactly how much python must i know. I know enough to move objects around, and don’t touch anything that might screw with my object’s internal working, i don’t even play with the physics. I recently downloaded the 2.42 test model, but none of the graphics demos work properly, so i’m still quite clueless as to how cool these in game graphics may be. Any help?

NeHe has one of the best sites for begginers of openGL programming. I have only began to scratch the surface of GLSL, here is a link that will answer some GLSL questions for you.
http://nehe.gamedev.net/data/articles/article.asp?article=21

As far as using your shaders in Blender’s game engine, it is sounding like you would include them in the FRAG=" ". I know nothing of Python, tho.

I would only benifit by that (looking at screens) if 1) the water used GLSL and 2) Blender w/ GLSL (2.41) is capable of doing it.

I have yet to see anything new GLSL offers for the game engine, or any BGE games that use it. Just demos with reflective textures and specular highlights :confused: