
The Book of Shaders - jashmenn
http://thebookofshaders.com/
======
wxs
His editor is very good, live preview of shaders, colour pickers, sliders for
scalars, breakpoints. Check it out here:
[http://editor.thebookofshaders.com](http://editor.thebookofshaders.com)

~~~
sreenadh
Which is the editor?

------
exDM69
As a graphics programmer, I'm always a bit disappointed that materials on
sharers tend to concentrate on fragment/pixel sharers and neglect vertex,
geometry and tesselation shaders.

You can do pretty cool procedural stuff in a vertex shader (without any vertex
data inputs). It's a necessity for animated models.

There's even less material on geometry and tesselation available.

This book seems to have rather nice pixel shading tricks but I'd like to see
some stuff about the other stages too.

~~~
Kristine1975
There are always (commercial) books like the "OpenGL 4.0 Shading Language
Cookbook, the "OpenGL Programming Guide" or the "OpenGL SuperBible".

------
melling
A useful previous discussion:
[https://news.ycombinator.com/item?id=9215582](https://news.ycombinator.com/item?id=9215582)

------
adamnemecek
You guys soul should check out this
[https://www.shadertoy.com](https://www.shadertoy.com)

~~~
viperscape
[http://shaderfrog.com/](http://shaderfrog.com/) is cool too, neat to
visualize it right in the browser

~~~
melling
I've got some OpenGL links on Github. There's a small section on Shaders. I
added the above links:
[https://github.com/melling/ComputerGraphics/blob/master/open...](https://github.com/melling/ComputerGraphics/blob/master/opengl.org#shaders)

------
trymas
This is amazing resource!

Though there is some unexpected behaviour on the site. After load, it always
automatically scrolls down to the last editor window, as all editors seems to
be selected on load. This is on Chrome Version 49.0.2623.110 (64-bit)

------
sparky_z
Can somebody explain to me the meaning of the variable names "st" and "pct" on
this page[0]? I understand the code itself, but I can't puzzle out what the
letters stand for.

[0][http://thebookofshaders.com/05/](http://thebookofshaders.com/05/)

~~~
Jasper_
"st" are texture coordinates, with "s" being the along the horizontal axis
into the texture, and "t" being the vertical.

One major stumbling block with graphics is that you'll find lots of one letter
names. "xyz" represents locations in the world, whereas "st" represents
locations along a surface area. "uv" is also sometimes used for texture
coordinates. There is a difference between them, but it's not interesting or
relevant to a beginner. Just know that both are in use.

I would guess that "pct" is an abbreviation for "percent", given that it
ranges from 0.0 to 1.0. It's definitely a poor choice of variable name.

------
Fillipoman
I wish the book was already done! Not many secti9ns have been finished since
I've last visited a year ago. :(

------
snap12789
you are a godsend; this is so clear!

