1基本公式:
- SetTexture [TexturePropertyName] { Texture Block }All the src properties can be either one of previous, constant, primary or texture.Previous is the the result of the previous SetTexture官方的解释 初学者看了很萌。本文主要证明Previous的值。首先举例:1。SubShader { Pass { // Apply base texture SetTexture [_MainTex] { combine texture } // Blend in the alpha texture using the lerp operator SetTexture [_BlendTex] { combine texture lerp (texture) previous } } }以上shander代码中 previous很好理解 就是前一个SetTexture combine完的结果2、SetTexture [_MainTex] {
constantColor (1,1,1,1)
combine constant lerp(texture) previous
}
// Multiply in texture
SetTexture [_MainTex] {
combine previous * texture
}第一个previous 该如何理解呢?它之前没有SetTexture喽!于事 本人就开始了大胆的各种猜想,假设previous 默认值为(0,0,0,0)测试1、没有灯 没有material的前提下

