SpiderPig Posted April 19, 2017 Share 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 Link to comment Share on other sites More sharing options...
Ma-Shell Posted April 19, 2017 Share 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 Link to comment Share on other sites More sharing options...
SpiderPig Posted April 22, 2017 Author Share Posted April 22, 2017 That looks like what I'm after. Thanks. Quote Link to comment Share on other sites More sharing options...
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.