I would like to recreate Unity’s standard shader in a DirectX11 program terrain demo. Is it possible to get the high level shader language code for Unity’s Standard Shader. I already looked at the Standard Shader code from the archive, but it is significantly wrappered. I would like to view Unity’s actual lighting model in the source code. Any help would be appreciated.
I already downloaded the unity shader archive source code, but it does not explicitly give the lighting equations used in their shader. I was wondering if that lighting model code was available (hlsl), or if there was some documentation about the lighting formula they are using for the standard shader.
All the code is there, just not all in one file. The standard.shader file sets the vertex and fragment functions that are declared in one of the cginc files it #includes, which happen to redirect to yet another .cginc file, and another. I think all told the code for the standard shader is spread between 12 cginc files and the shader file, all of which are included with the built in shader source.