I would like to get anlialiased RenderTexture on Editor Platform with the code below:
var rt : RenderTexture = new RenderTexture(resWidth, resHeight, 24, RenderTextureFormat.ARGB32);
rt.filterMode = FilterMode.Trilinear;
currentCamera.targetTexture = rt;
currentCamera.Render();
I expected setting the filtermode would ensure that, but it does not. (in the Editor Platform)
Would be grateful for any suggestions.
You could also put an antialiasing script (importable image effect) on the camera that renders into the RenderTexture.
The filterMode will just influence the look of the RenderTexture while displaying the texture, but the pixels of the RenderTexture will always be non-anitaliased.
Unfortunately, multisampling or other forms of antialiasing are not supported for RenderTextures.
As suggested here: Render Texture and antialiasing - Questions & Answers - Unity Discussions , your only chance is to increase the RenderTexture’s size to its max (2048x2048) and use trilinear filtering with that.
EDIT: apparently in 4.2, Anti-Aliasing for RenderTextures was introduced. However I have not tried it so far.