Пример #1
0
        public Texture3DAtlasDynamic(int width, int height, int depth, int capacity, GraphicsFormat format)
        {
            m_Width        = width;
            m_Height       = height;
            m_Depth        = depth;
            m_Format       = format;
            m_AtlasTexture = RTHandles.Alloc(
                m_Width,
                m_Height,
                m_Depth,
                DepthBits.None,
                m_Format,
                FilterMode.Point,
                TextureWrapMode.Clamp,
                TextureDimension.Tex3D,
                false,
                true,
                false,
                false,
                1,
                0,
                MSAASamples.None,
                false,
                false
                );
            isAtlasTextureOwner = true;

            m_AtlasAllocator  = new Atlas3DAllocatorDynamic(width, height, depth, capacity);
            m_AllocationCache = new Dictionary <int, Texture3DAtlasScaleBias>(capacity);
        }
Пример #2
0
        public Texture3DAtlasDynamic(int width, int height, int depth, int capacity, RTHandle atlasTexture)
        {
            m_Width             = width;
            m_Height            = height;
            m_Depth             = depth;
            m_Format            = atlasTexture.rt.graphicsFormat;
            m_AtlasTexture      = atlasTexture;
            isAtlasTextureOwner = false;

            m_AtlasAllocator  = new Atlas3DAllocatorDynamic(width, height, depth, capacity);
            m_AllocationCache = new Dictionary <int, Texture3DAtlasScaleBias>(capacity);
        }