A Blend Shader That Uses Vertex Information
So i need to make a basic blend shader which works a bit more complex than a normal blend shader.
I have a mesh with n x n vertices. Let's say each vertex has information assigned to it such as type of terrain (ie. grass, dirt, snow).
So a 3x3 set of vertices might have data like this:
...
grass snow snow
grass grass dirt
grass dirt dirt
...
Based on these values, the mesh should render each vertex with the given texture, and if 2 adjacent vertices have differing data, then it will gradient from one texture to another.
I made a basic version of this but unfortunately it doesn't take into consideration vertices so when i play around with it, the entire mesh material will fade into the next material.
Here is the shader code: http://pastebin.ca/3730042
Can anyone point me in the right direction?
Your answer
Follow this Question
Related Questions
Shader error in 'libS/Lit': redefinition of 'SurfaceData' at 0 Answers
Explain me this light-shader please 0 Answers
Shader metallic effect 0 Answers
Is there any way to do multiple passes on a texture / in a fragment shader? 1 Answer
Shader error : unexpected $end, expecting TOK_SETTEXTURE or '}' at line 18 1 Answer