精選文章

SmallBurger Asset Home

  SmallBurger

2016年8月19日 星期五

Hight performance sample water shader in Unity

最近因為工作的關係需要使用Unity來開發,發現官方的水範例及Store上都沒有比較適合在Mobile平台上使用(效能好,資源少,效果可以接受…),於是只好把之前開發的簡易的水效果拿來移植到Unity上。

相關技術及使用資源如下:
  1. 一張NormalMap
  2. 一張ReflecMap
  3. 一個Plane
  4. UV動畫捲動(NormalMap、ReflecMap單獨分開)
  5. 依照流動的Normal,進行ReflecMap的UV擾動處理
  6. 最後依照ReflectionRatio與Water Color進行混色處理
實測效能:
在ASUS的NEXUS2上可以always跑到60個FPS以上

目前支援參數調整:

  1. NormalMap and ReflecMap texture name
  2. TileCount
  3. NormalMap and ReflecMap UV animation speed
  4. Water Color
  5. WaterAlpha
  6. NormalDistortion(擾動參數)
  7. ReflectionRatio
相關Demo影片:




Dream continues in...

沒有留言:

張貼留言