shader 小结


vertOut vert(appdata_base v) {
                vertOut o;
                o.pos = mul (UNITY_MATRIX_MVP, v.vertex);
                //ComputeScreenPos将返回片段着色器的屏幕位置scrPos
                o.scrPos = ComputeScreenPos(o.pos);
                return o;
            }
 #ifdef SOFTPARTICLES_ON  //开启软边效果
    o.projPos = ComputeScreenPos (o.vertex);
    COMPUTE_EYEDEPTH(o.projPos.z);
    #endif


你可能感兴趣的:(shader 小结)