Hey! I want to learn how to write shaders!

Hey! I want to learn how to write shaders!

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Post Reply
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Hey! I want to learn how to write shaders!

Post by MidKnight »

Does anybody know the best way to get started?

HLSL, GLSL, Cg, it doesn't make a difference to me. I just wanna make some cool effects. :-)
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Hey! I want to learn how to write shaders!

Post by Beherith »

Read this: http://wiki.labomedia.org/images/1/10/O ... dition.pdf

But seriously, start with this tutorial, and crack open a shader in spring. Do you know much opengl/how the 3d gfx pipeline works?
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Hey! I want to learn how to write shaders!

Post by MidKnight »

I don't know very much about graphics pipelines at all, just that data goes through a bunch of steps to get rendered and thrown on the screen.
Ooh! I also know that vertex data gets fed into a vertex shader, the results of which go to the pixel (or fragment) shader!

...That's about it.

I know Python and Lua. I have zero experience with writing C++.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Hey! I want to learn how to write shaders!

Post by Das Bruce »

MidKnight wrote:I know Python and Lua. I have zero experience with writing C++.
Brace for fun!
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Hey! I want to learn how to write shaders!

Post by Beherith »

Unzip the map Gehenna Rising, and fool around with the lava shader until you understand every line of code in the shaders.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Hey! I want to learn how to write shaders!

Post by knorke »

slightly related, if the Gehenna Rising shader does not work on my gfx card, does that mean no shaders at all will work for it?
(outline widget, xray, unit higlighter and all that stuff worked)
Post Reply

Return to “Off Topic Discussion”