private static bool AtlasRectMatchesPage(ref BitmapAllocator32 allocator, BMPAlloc defAlloc, RectInt atlasRect) { ushort num; ushort num2; allocator.GetAllocPageAtlasLocation(defAlloc.page, out num, out num2); return((int)num == atlasRect.xMin && (int)num2 == atlasRect.yMin && allocator.entryWidth * UIRVEShaderInfoAllocator.pageWidth == atlasRect.width && allocator.entryHeight * UIRVEShaderInfoAllocator.pageHeight == atlasRect.height); }
private static Vector2Int AllocToTexelCoord(ref BitmapAllocator32 allocator, BMPAlloc alloc) { ushort num; ushort num2; allocator.GetAllocPageAtlasLocation(alloc.page, out num, out num2); return(new Vector2Int((int)alloc.bitIndex * allocator.entryWidth + (int)num, (int)alloc.pageLine * allocator.entryHeight + (int)num2)); }
static bool AtlasRectMatchesPage(ref BitmapAllocator32 allocator, BMPAlloc defAlloc, RectInt atlasRect) { UInt16 x, y; allocator.GetAllocPageAtlasLocation(defAlloc.page, out x, out y); return((x == atlasRect.xMin) && (y == atlasRect.yMin) && (allocator.entryWidth * pageWidth == atlasRect.width) && (allocator.entryHeight * pageHeight == atlasRect.height)); }
#pragma warning restore 649 static Vector2Int AllocToTexelCoord(ref BitmapAllocator32 allocator, BMPAlloc alloc) { UInt16 x, y; allocator.GetAllocPageAtlasLocation(alloc.page, out x, out y); return(new Vector2Int( alloc.bitIndex * allocator.entryWidth + x, alloc.pageLine * allocator.entryHeight + y)); }
public Color32 TransformAllocToVertexData(BMPAlloc alloc) { Debug.Assert(pageWidth == 32 && pageHeight == 8); // Match the bit-shift values below for fast integer division UInt16 x = 0, y = 0; if (m_VertexTexturingEnabled) { m_TransformAllocator.GetAllocPageAtlasLocation(alloc.page, out x, out y); } return(new Color32((byte)(x >> 5), (byte)(y >> 3), (byte)(alloc.pageLine * pageWidth + alloc.bitIndex), 0)); }