Rect GetRect(HoloPlay.Quilt.Tiling tiling, int view) { // copy to fullsize rt int ri = tiling.numViews - view - 1; int x = (view % tiling.tilesX) * tiling.tileSizeX; int y = (ri / tiling.tilesX) * tiling.tileSizeY; // the padding is necessary because the shader takes y from the opposite spot as this does Rect rtRect = new Rect(x, y + tiling.paddingY, tiling.tileSizeX, tiling.tileSizeY); return(rtRect); }
void UpdateTiling() { var newTiling = new HoloPlay.Quilt.Tiling("streoView", tileNumber.x, tileNumber.y, renderTexture.width, renderTexture.height); quilt.tiling = newTiling; // UpdateMesh var mesh = CreateMesh(tileNumber.x, tileNumber.y); meshFilter.mesh = mesh; }