はじめに 帰省の新幹線の中でこういうポストプロセスエフェクトを作ったので、作り方を紹介します。 空間の歪めかた分かってきました (新幹線で楽しくシェーダー勉強してます) pic.twitter.com/oyKSAV9sSt— setchi (@setchi) 2017年12月28日 実装方針 ポータルの中心から一定距離内のピクセル(緑色の範囲)を外側に圧縮して、広がった分だけ内側に違う絵を描画します。 実装 ShaderLab Shader "Custom/Portal" { Properties { _MainTex ("MainTex", 2D) = "white"{} } CGINCLUDE #include "UnityCG.cginc" sampler2D _MainTex; sampler2D _SubTex; float _Aspect; float _Radius; flo