Jump to content

How to learn shader development for Leadwerks 3


Letschki
 Share

Recommended Posts

Hello All,

 

i have recently bought Leadwerks 3 and have to say that i think that Leadwerks 3 is an excellent package and i don't regret buying it. To all Leadworks developers: Great Product and keep up the great work! smile.png

 

My professional background is 20+ years C++/VB/Java database and system programming (mostly for insurance companies). In my spare time i used Ogre 3D and Torque 3D.

 

To the topic of the post. I have some questions regarding shader development:

  • What are the best practices to learn/develop shaders for the engine?
  • What tools should i use?
  • Where can i find information about writing / using shaders specifically for the use with Leadwerks 3?
  • Where can i get Leadwerks 3 specific information like the available uniforms etc.?
  • Any book recommendations regarding GLSL development?

For example: Where can i get information about the naming conventions of the shader files ("diffuse+glow.shader" or the dynamic/lightmapped directories). What are the requirements these different shaders have to meet?

 

I don't need necessarily step-by-step tutorials, but some links to articles, examples or code that helped you to get into Leadwerks shader development would be really helpful.

 

Thanks in advance!

Link to comment
Share on other sites

Hi Letschki,

 

Glad to see you are liking Leadwerks. I am not an advanced shader programmer but this is what I know:

  1. Have a look at the existing shaders. I started looking at the diffuse shader and from there on made some adjustments to see what everything did.
  2. There aren't any specific tools for shader editing. You can use the leadwerks script editor to make shaders and test them in the editor.
  3. I am afraid that there is not much information about writing shaders unfortunately. At least, not specific for Leadwerks that is. The only documentation that I know is in the command reference: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/shader/
  4. Sorry don't know this
  5. Sorry don't know this

Link to comment
Share on other sites

You need to understand 4x4 matrices, color math, and vector math.

 

Shaders themselves tend to be very small one-time programs, so there's not a lot of deep tutorials on "writing shaders". It's really just a matter of deciding what you want. The best way is to just copy a shader in Leadwerks 3, start modifying the code in the script editor, and see what the result is.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

If you just hit F5 in the script editor, you will see right away what your changes do. It makes shader development much easier than in the past when I had to start the engine each time I modified something.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...