Somehow in my experimenting I figured out if you subtract some number from TBN_Matrix you reduce the parallax effect at grazing angles. The one point I want to make about this section is this line: I have some grasp on this first section (in the vertex stage) and I can't remember how I wound up with it but it's just a variation on the TBN matrix in the Leadwerks parallax shader. I want to make a couple points so you can see some of the thinking behind this shader and adapt it to suit you, so I guess I'll just break this up in sections: The blend mode is set to alpha, it's z-sorted and I unchecked "cast shadows" in the material editor. ![]() I put this shader on a Leadwerks box brush and flattened the box to a plane. You may be able to tell I don't entirely know what I'm doing but that seems to be all one needs for noob shading. Since this is made from a few previous shaders, and because I feel I missed some points before, and because I'm only posting this one and I've heard a blog works well when it's somewhere between 200-500 words, AND because the shader code feels a little cluttered to me I figured I'd go a little in depth. This shader is made up of the fog shader (39_ground fog) and the POM shader (27_parallax occlusion) with a texture scroll element (02_texture scroll and/or 20_creek), which is nice because if you have these you can study each aspect of the shader independently if you so desire. I worked out a pretty good mud puddle shader which I'll post next but I figured this one is done and I've tweaked the **** out of it so I need to stop at some point and know when it's done. This week I've been working on puddles and fog in keeping with that spooky October/November vibe. I stare at rocks.and when autumn hit I started staring at. Since I started doing shaders I've begun to stare a lot at things.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |