コード例 #1
0
    public static void CopyIntoTexture(Texture2D sourceTex, Texture2D targetTex)
    {
        Rect source = new Rect(0f, 0f, (float)targetTex.width, (float)targetTex.height);

        TextureScale.GPUCopy(sourceTex, targetTex.width, targetTex.height);
        targetTex.ReadPixels(source, 0, 0, false);
        targetTex.Apply(false);
    }