Shader resources?

Discussion and feedback on Construct 2

Post » Tue Feb 19, 2013 12:41 pm

Hi all,

Anyone know a good place to get started learning about shaders? I'd like to write my own for fun but all the documentation I've found is very complicated. I could do with a primer :)
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Tue Feb 19, 2013 4:53 pm

NVIDIA's GPU Gems is a great place to get started.

Most of their shaders are HLSL though, so you'll have to port them to GLSL first. More complex shaders also may not work with WebGL (which is OpenGL ES in a bubble, basically)
B
6
S
2
Posts: 206
Reputation: 1,685

Post » Tue Feb 19, 2013 5:29 pm

I actually found it hard to come by good info when I was developing the feature too, especially since WebGL shaders, OpenGL ES shaders, and desktop OpenGL shaders are all different in subtle ways and often documentation is for one specific variant without saying so.

Also, Construct 2 only uses a small subset of shaders. While you can do a lot in general, C2 shaders are only a fragment shader with some built-in and custom parameters.

Learning by example is probably your best bet. Lots of pretty examples here: http://glsl.heroku.com/ (but some are pretty heavy on math!)Ashley2013-02-19 17:29:52
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Feb 19, 2013 5:54 pm

Those links might also be quite helpful:

http://www.iquilezles.org/apps/shadertoy/
http://www.html5rocks.com/en/tutorials/webgl/shaders/
http://www.chromeexperiments.com/webgl/
http://webglplayground.net/gallery

Your best source for learning about shaders in general are still chipmakers, though.

NVIDIA's developer zone is unmatched, IMHO.
B
6
S
2
Posts: 206
Reputation: 1,685

Post » Tue Feb 19, 2013 8:42 pm

Awesome, thanks for the links!
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783


Return to Construct 2 General

Who is online

Users browsing this forum: edisone and 7 guests