MSAA
https://en.wikipedia.org/wiki/Multisample_anti-aliasing
SSAA(Super sample anti-aliasing)のひとつ
解像度を増やして(2x2、4x4)そのままレンダリングするわけではない
FSAA(Full scene anti-aliasing)という
重い
サンプル数を増やすのはdepthとstencilだけで、ピクセルシェーダーはピクセルごとに1回でサンプルたちで使いまわす
Unity
カメラやRenderTextureごとに指定できる
Quality設定からも指定できる
MSAAがオンの場合、activeTargetから切り替わるときにResolveされるっぽい
Resolve=MSAAを反映して普通のテクスチャに戻す
https://docs.unity3d.com/ja/current/ScriptReference/RenderTextureDescriptor-bindMS.html
bindMS = trueにすると、自動Resolveを回避できる
深度マップ
https://forum.unity.com/threads/what-a-most-convenient-way-to-get-depth-buffer-for-a-antialiased-render-target.662470/
CustomResolverを使うのが正攻法?
URPの実装を見た方がいいかも
https://github.com/BattleAngelAlita/SRPBlog/blob/master/SRP-Demo/Assets/SRP-Demo/20-CustomResolvePipe/CustomResolvePipe.cs
https://github.com/BattleAngelAlita/SRPBlog/blob/master/SRP-Demo/Assets/SRP-Demo/20-CustomResolvePipe/CustomResolve.shader