unity shader 效果公式

a.漫反射公式:算法 diff=C*max(0,cos<L,N>);//C是顏色和強度_LightColor0.rgb函數 代碼: diff=max(0,dot(i.normal,i.lightDir))//i的單位向量and單位法向量優化 c=tex2D(tex,i.uv)*_LightColor0*diff//_LightColor0表示的是場景中平行光的顏色和強度spa ----------
相關文章
相關標籤/搜索