Esempio n. 1
0
    private static IEnumerator partsCombiner(Request request, List <ViewPart> parts, int maxAtlasDimension)
    {
        yield return(null);

        Combine.CalculateAtlasLayout(parts, out int curSize);
        yield return(null);

        int renderTextureSize = Mathf.Min(Mathf.ClosestPowerOfTwo(curSize), maxAtlasDimension);

        request.Atlas = new RenderTexture(renderTextureSize, renderTextureSize, 0, RenderTextureFormat.ARGB32);
        request.Atlas.isPowerOfTwo = true;
        request.Atlas.filterMode   = FilterMode.Bilinear;
        request.Atlas.useMipMap    = false;
        yield return(null);
    }