如何查看shader性能消耗
1.Alt 8切换Shader Complexity mode查看shader性能消耗 (Alt 4切换回Lit Mode正常光照模式)
2.材质蓝图里查看instructions数量(如图中箭头所示)
3.直接在target platform上测试是最准确的。
(running fewer instructions, shader would perform better, but its not accurate because each instruction take different time)
汇总:Measuring shader performance
Method #1 Shader complexity View Mode
Method #2 Instruction Count
Method #3 Test on your target platform
优化材质的方法 Optimizing shader performance
Method #1 Get rid of anything you're not using
Method #2 Refactor math formulas
Method #3 'Pipelining' -Combining components into float4s to do less math
Method #4 Texture channel packing (Metalic Roughness Nornam AO)