Page 1 of 1

Shading

Posted: Wed Mar 14, 2012 2:42 pm
by Benjamin100
I don't understand how to use GLSL to create shading.
Is there any resource I can use that explains how to do it for people who don't know the mathmatical terms?
It appears it involves advanced calculations.
Can this be easy to understand, or is there an easier way of doing it?
I don't understand what needs to be calculated.

Thank you,

-Benjamin

Re: Shading

Posted: Wed Mar 14, 2012 3:21 pm
by short
Um, it's basically purely math based. Sorry, if you want to do more then just setting a color then you need the math.

I can give you the best tutorial I have seen on getting introduced to it,

http://www.arcsynthesis.org/gltut/

In current OGL there are five different shades to learn, however I suggest you start with the fragment/vertex shaders, they are the easiest to understand.

Re: Shading

Posted: Wed Mar 14, 2012 3:26 pm
by superLED
I guess you'll be looking forward to thecplusplusguy's tutorials that will be up soon.
He will be going over this exact topic.

Re: Shading

Posted: Thu Mar 15, 2012 12:59 am
by Ginto8
GLSL is basically a way of taking the old-fashioned, restrictive fixed-function pipeline, throwing it out, and putting whatever you want in its place (with certain restrictions). For example, with OpenGL 4, there are 5 different stages of the graphics pipeline which you can program: 2 controlling tesselation, 1 working with primitives as they come through the pipeline, 1 dealing with vertices as they come through the pipeline, and 1 dealing with fragments (basically "pixel candidates" - they may or may not actually become pixels).

This approach gives tremendous flexibility and control to graphics programmers, but with great power comes great responsibility. You have to understand what's happening, and that can take some work. Be careful, but don't be afraid of the math - it's actually some very interesting stuff.

Re: Shading

Posted: Sat Mar 17, 2012 4:18 pm
by Benjamin100
Thanks guys.

-Benjamin