Home Unity

[Unity] Vertex painting shader.

Hi,

for the last, what, 2 months?, I've been looking for an efficient way to texture this and lots of buildings.

Where i live, these kind of color stripe buildings are common, so i need a way to reproduce this

So i stumbled upon this great post.
Until then, i didn't knew vertex colors, or what they where useful for, i don't have previous experience in writing shaders, so i use shadergraph.


For this, i use a texture array that gets its index from vertex color multiplied by the max texture number, which is 16.
It gets blended with a lerp function, then multiplied with a color node, the comparison node, checks vertex color and if its less than ColorRange, then it multiplies.

The problem is it doesn't blend properly, i also tried multiplying before the lerp(ceiling, floor, and both samplers at the same time), hoping the colored texture blends properly, but no luck, the result looks like this:


I need help, i'm very frustrated to be honest, and it doesn't seem to be a way out of this, if you know a better approach to this, i'm all ears .
Sorry for English.





Replies

Sign In or Register to comment.