SpiderPig Posted April 19, 2017 Posted April 19, 2017 I've taken a look at the terrain.shader that comes with Leadwerks to see if I can modify it to my needs, but I'm not sure where to start. What I want is to texture a grid mesh of a terrain with multiple textures based and height and slope, and maybe even an alpha map. If someone is able to point me in the right direction or even a small snippet of code that shows how the height and slope can change where a texture is shown I'd appreciate it. Thanks. Quote
Ma-Shell Posted April 19, 2017 Posted April 19, 2017 I think, what you're trying to do is called texture splatting. Take a look at this link: http://www.gamasutra.com/blogs/AndreyMishkinis/20130716/196339/Advanced_Terrain_Texture_Splatting.php The shader should give you access to the normals and positions, so you should be able to take these to determine height and slope. 1 Quote
SpiderPig Posted April 22, 2017 Author Posted April 22, 2017 That looks like what I'm after. Thanks. Quote
Recommended Posts
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.