Standard shader with vertex colors

I was hoping it would work on iOS but it didnt when I tried. Is it normal?

I’m not sure, but it seems to me you device does not support Shader Model 3.0.
It turns out shader isn’t working with SM 2.

Thanks a Lot defaxer, grab this package and try it out with your shader and you will get amazing results! I really wanna be greedy and keep this to myself but its not the right thing to do :

Vertexdirt: Unity Asset Store - The Best Assets for Game Making

It allows AO baking to vertex colors WHILE using the GI in Unity allowing for perhaps the most fastest performance possible and since it bakes AO to vertex colors it will perform better on mobile devices compared to lightmaps i believe.

This is an example of it. Its amazing!

2107935--138197--AOTest.png

Nice. Bookmarked :sunglasses:

Hi !

First thing: good work, it helped me a lot.
There’s something I want to ask you: where does your ‘UnityVC.cginc’ file come from? Did you write it all or just modified an existent script?
I’d like to know the best way to merge a custom shader into the Standard shader, like you did, but I’m new to shaders and I couldn’t find the link between your file and the originals.

If you could help me to understand it better I would really appreciate it!

Thanks

“UnityVC.cginc” is a file which includes all structs and functions that “StandardVC.shader” uses.
UnityVC based on UnityStandardInput.cginc file, I’ve modified it to support vertex colors.

AFAIK you can replace standart shader with you own version if its name is “Standard” and file is in “Resources” folder. I know people are replacing terrain shaders that way

Thanks, good to know!

Good job again on this shader.

Hello!

Thank you for the shader! I’m super happy I’ve found a Vertex Color shader but I’m sad that I’m not able to make it work.

When using unity 4 we used to have greyscale textures that we colored using Vertex Colored Multiplied on top of the Difuse, I tried just applying your shader on top of the texture but it’s not showing any result here, could you give me a hand?

I’m using 5.0.2f1

(The wall in the back its what’s selected) http://puu.sh/hZzC6/74a7ef84a7.jpg

Are you using Dx9 or Dx11? Shader currently does not work with Shader model 2.0 Maybe this is the case?

Even when in DX11 mode it doesn’t work, what’s the latest version of the Shader I should download? Maybe I got it wrong?

Just to check I went to maya and all vertex colors are there, but still not in untiy

In the first post updated version link is the one you need, note that intensity must be greater than zero. Also there is a “debug sphere” in a package use it to check if vertex color is working

Hello, everyone! Just added Standard(Specular) shader version for you to try. Included an example scene (to see if shaders are working for you), which must look like a picture below.

2143290–141351–UnityVC.unitypackage (151 KB)

I’ve noticed it doesn’t work with deferred rendering. I haven’t tried it out in a build yet but in the editor DX11 deferred anything with either shader renders as grey with no color. Forward it works fine. Anyone else get that?

Yeah, It’s was not correctly blending (if you have textures applied to your material) in deferred rendering, I’ve fixed it but with kind of tricky solution. To make it correct way I have to rewrite standard shader almost entirely :frowning:
Anyway if everything goes well, I will update it next week with that deferred fix, SM2.0 support and shadows with vertex alpha.

This looks so great, but I need deferred support too… thank you sooooo much! :slight_smile:

Ok, here is a new updated version with deferred fix and SM 2.0 working (on my machine at least)

2182694–144627–UnityVC.unitypackage (268 KB)

3 Likes

THANKS!! that is so very cool of you. trying it tonight…

It works perfectly… Thank you so much! :smile:

This is very useful. I don’t have the time or energy right now to learn the mechanics of ShaderLab.

Hi defaxer,
Thanx for this shader… I am 3d artist and right now m R&D on one of my project using your VC shader. I am facing one issue that when I open my project in 32bit unity 5 then shader dose not calculate VC. Its working awesome in 64bt unity 5… its 32 bit issue or any other setting i have to change.