Vertex Blended Standard Shader

I found I had use of a vertex blended standard shader, so I hacked one together.
I figured someone else might have use of it so providing it here as is.


It uses vertex colors to blend between the primary and secondary maps.

2350235–159125–Vertex Blend.unitypackage (1020 KB)

There’s either a syntax error or a missing function on line 297 of vertex blend core. The problem is this:
Unity_GlossyEnvironmentData g; I’m unfamiliar with cg language so…

Are you running Unity 5.2? If not, then this is probably the issue.

yeah, I’m on 5.1, didn’t think of that :confused:

thanks for the quick reply though!

EDIT: Just installed the 5.3 beta (why not), but throws the same error. Do you mean that this will only work with 5.2? Still complains about an undeclared variable ‘g’.

EDIT2: Well it’s working fine in 5.2. Really appreciate you sharing this with the community TF! I’ve been looking everywhere for something simple like this to blend multiple textures together on meshes and not terrains.

Yeah, it was made using the shaders from 5.2. It does rely on the included features of the original standard shader, seems they have changed too much to allow some sort of cross compatibility between versions.
You could grab the built in shader source from 5.2 and use with this, maybe would allow you to use in other versions, but I have no idea what else it would break.
I really wish I understood how to inject just the features I need to do this in the standard shader, but it’s all beyond me.