- Home /
Replacing VertexLit shader?
Starting with Unity 4.6 there seem to be lots of issues with materials using the VertexLit shader. I've sort of sidestepped these issues by changing most of my materials to use the Diffuse shader. But, this doesn't always look so hot.
Obviously, I dont know a lot about shaders but it seems that if VertexLit is being phased out that there would be another shader that would work similarly?
Any advice?
Personally I've been jumping into mobile development and have had to make a bunch of shaders for a variety of reasons, most of them performance related. What exactly is it that you're looking for as a replacement? A simple rgb diffuse texture or something more?
Well, I've been using a simple diffuse shader since the vertexlit stuff started doing so really weird stuff. But, the diffuse shader creates an object that looks ... well, diffuse ... that's fine most of the time but sometimes you just want that shiny new car look and its not obvious to me what shader to use for that. Vertexlit was just easy and my understanding was that it was very efficient in terms of draw calls?
Seems odd that Unity would just discontinue Vertexlit without providing a similar option. But then, they may also be assu$$anonymous$$g that their users know a lot more about shaders than I do;)
It would help people to give you a better answer if you could tell us the issues you're having with the current vertex lit shader.
Its a little hard to explain. At times, an object using a material with the vertexlit shader just would not display at all (as if it were transparent) and at others what gets displayed is just highly distorted to put it mildly. So much so, that you would think the problem is the mesh and not the shader.
This all happens when trying to bring a project built in Unity version 3.4.2 into 4.6 and it may be something I am doing.
And, as I said by simply replacing the Vertexlit shader with diffuse solves the problem. I've been assu$$anonymous$$g that the real issue is that VertexLit is being phased out. $$anonymous$$aybe I am wrong about that?
Anyway, the core question is this ... if you want a shader that gives you a shiny/glossy look, what would you use? Is there a built-in shader other than VertexLit? Would you build your own?
For lighting effects you probably want to use the standard shader or any of it's variants. They use the new surface shader function that basically takes your shader code and compiles it into a vert/frag shader with a bunch of lighting info thrown in. The VertexLit shader is about as basic as shaders get and the shadows are as simple as it can be so you'll see artifacts in anything but the most basic of circumstances.
Your answer