I just want to extend the standard shader with, for example a blend between two textures for the albedo. I know how to do that in the “old” surface shaders and also in CG, but I have no idea where to start with the new standard shader. I have downloaded the built-in shaders and have taken a look at all the includes, but I haven’t I can’t figure how to make this work. Because there is not documentation yet, could anyone post a quick example of a standard modified shader, so I could start learning form that?
Many thanks cakeslice. It was pretty easy at the end… I have notice that there is a really small difference between the Standard (RC1) and this shader in the roughness representation (reflections shows slightly different) but anyway I can start growing from here. Many many thanks!
Hi,
I keep investigating the new standard shader and have seen some interesting things. When you made a surface shader using “#pragma surface surf Standard” you get the proper lighting, but not all the performance/quality tweaks that the Standard shader does. As an example the shader posted above by cakeslice does work perfect but has worst performance on iPad 3 than the normal Standard, and thats because the standard shader when running on iPad 3, iPad2 … runs with per vertex specular and other simplifications. That’s great, but because is so transparent for us I don’t know how this is happening and how to replicate when using our custom surface shaders. Checking the shader includes I see keywords all over that place (SHADER_API_MOBILE , UNITY_BRDF_FBS NRDF2_Unity_PBS …) which I’m sure that this shows the path, but I don’t see where this are being changed by platform. I will keep searching and post my progress.
SHADER_API_MOBILE and anything using SM2.0 is where you want to look. From what I understand a number of features are switched off/lowered with certain hardware, ranging from per-vertex specular to turning off dithered shadows.
I recommend taking some time to sit through and read through the Standard Shader and its includes to get a good picture of what its doing, especially with mobile optimizations. Hopefully some of those features (scaling down for lower hardware) will make it into surface shaders as well.