Reading note of < Unity 5.x Shaders and Effects Cookbook > 1
about migrate built-in shaders.unity version 4 -> 5
Technically speaking,this is a SurfaceShader based on physically-based rendering
.So it was different way.
About migrate your built-in shaders you must know:
1.Shaders no longer apply a 2x multiply of light intensity
1 | // A common pattern in shader code that has this problem will look like this |
2.Surface shaders alpha channel change
By default all opaque surface shaders output 1.0 (“white”) into alpha channel now.
If you’re using custom lighting functions, you probably want to add something like “c.a = s.Alpha” towards the end of #pragma surface line.
3.Sorting by material index has been removed
The order depends on what reduces the most state changes to render the scene.
4.Fixed function TexGen, texture matrices and some SetTexture combiner modes were removed
5.Mixing programmable & fixed function shader parts is not allowed anymore
6.“unity_Scale” shader variable has been removed
1 | // Unity 4.x |
The detail: http://docs.unity3d.com/Manual/UpgradeGuide5-Shaders.html
本文标题:Reading note of < Unity 5.x Shaders and Effects Cookbook > 1
文章作者:Keyle
发布时间:2016-05-15
最后更新:2024-08-20
原始链接:https://vrast.cn/posts/b175d191/
版权声明:©Keyle's Blog. 本站采用署名-非商业性使用-相同方式共享 4.0 国际进行许可