I try to get FBX model render texture from camera
but I got this
wtf? noise around? android was fine but it happen on ios only .
Unity ver:2019.4.3f1
MainCamera Setting:
Depth only
Culling mask β> fbx model layer
Depth: 0
BackgroundCamera Setting:
Solid Color : red color
Depth: -1
so I try to render with nothing but a background image(blue image background)
I got this
then I go to create a new scene , drop the cameras, add simple test script, and every thing was fine! so how does this happen??? help plz
public Texture2D GetCameraRenderImage()
{
Rect rect = new Rect(0, 0, MainCamera.pixelWidth, MainCamera.pixelHeight);
RenderTexture renderTexture = new RenderTexture(MainCamera.pixelWidth, MainCamera.pixelHeight, 24, RenderTextureFormat.ARGB32);
Texture2D screenShot = new Texture2D(MainCamera.pixelWidth, MainCamera.pixelHeight, TextureFormat.ARGB32, false);
MainCamera.targetTexture = renderTexture;
MainCamera.Render();
RenderTexture.active = renderTexture;
screenShot.ReadPixels(rect, 0, 0);
screenShot.Apply();
MainCamera.targetTexture = null;
RenderTexture.active = null;
Destroy(renderTexture);
renderTexture = null;
return screenShot;
}