Jump to content

Outroduction


havenphillip

884 views

 Share

Ok so I didn't quite do one shader a week but I got to 52. I wasn't sure I could pull it off but hopefully the shaders are diverse enough to give something to work with for most occasions. I tried to keep the language consistent throughout and organize them sort of from easy to hard. I threw in all kinds of links because I don't know a lot of the technical terminology. I don't know how Ultra is going to be but I get the impression it's not going to be too much different. From what I understand, Ultra uses the PBR model for lighting rather than the Blinn-Phong and it uses Vulkan as its shader language. From what I've seen of Vulkan it doesn't look too much different.

 

I want to continue here for at least a little while. There are still a few things I want to make. An ocean shader and a snowtracks shader, for instance. I've found that LE4 can do just about anything I can think of, though not perhaps on a large scale, and from what I've heard Ultra is going to be extremely fast so hopefully it will be user-friendly enough (for noobs such as myself) that its users can make some of those open world environments we see in PS4 games and such. "Fastest game engine on the market" [paraphrase] is a bold claim but LE4 turned out to be exactly what it was advertised to be and I'm starting to get those little tingles of excitement the closer it gets to the release date. Leadwerks is legit.

 

A couple tips: One of the things that helped me a lot in working with shaders was to learn what the errors mean in compile. I ran into a few common ones. Sometimes I would try to multiply a vector3 by a vector4 or some other kind of thing and this doesn't work. Also, you can't put uniforms on the left-hand side of the equation (to the left of the "equal" sign). Sometimes I would forget a semicolon at the end of a line and you'll get an error for the line under that line (that's a tricky one because it's telling you the error is on the NEXT line). Also make sure you declare any variable you introduce, such as "float" or "vec3" etc. Most commonly I would simply get an error because I tried to use something that I didn't declare. Like I'd try something like:

    float mask = texture(texture0,ex_texcoords0).r;

...and the compiler would tell me that texture0 doesn't exist  because I forgot to include it in the shader like:

    uniform sampler2D texture0;

 

Another trick I found useful was to use "discard" in the fragment stage. Sometimes I was able to tell where something was or what something did because I used discard. For instance, try this in any of your shaders:

    If (gl_FragCoord.w < 0.1) discard;

...this is a good way of finding out what stuff does.

 

I'm not entirely sure which direction I should go from here. There are certainly some shaders I still want to do and I'll post them here when I'm done. Ideally I'd be able to do ALL the shaders. But that's a process. But I'm open to ideas and shader ideas. One thing I thought might be cool is to start making little scenes. That would mean I'd need to learn how to do some modeling. I just don't know which program I should get for that.

Anyway happy shading. See you soon.

 

  • Like 5
 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   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.

×
×
  • Create New...