Hello again everyone, and thank you in advance for taking the time to read my question.
Basically, my team is working on a game which features a world map and a minimap. We’ve had a working minimap for quite some time that I programmed using a second camera and rendertotexture. It was never intended to be a long term solution, as the performance hit is pretty large (and we plan to have an artist stylize the maps).
Recently I began to implement our more long term solution. I created a tool for us to capture an image to be used as a world map texture, and import that texture into the game creating a world map (the tool captures all the required metadata for rotating and scaling the world coordinates into “map” coordinates).
So, it’s time to convert our minimap into a more long term solution. Basically what I want to do is this:
-
Use a single Texture2D for the world map and minimap
— World map displays the entire Texture2D (already done)
— Minimap displays only a portion of the Texture2D -
Have the GUI Minimap display only a select portion of the world map (most likely using a material shader to create a circular map appearance).
-
Allow zooming the minimap in and out by displaying a larger or smaller section of the world map in the minimap.
I already have the required functionality for getting the location in coordinates on the world map where I want to take my chunk out of the map. However, I would love a little guidance on how exactly to go about taking that chunk of the world map into a texture2D. I am attaching an image to further illustrate this in case I am not being clear.
Id imagine GetPixel/SetPixel would be a relatively easy way to solve this issue. However, would it be efficient for something that would get called every frame? Is there another solution (perhaps shader-based) which would be more efficient?
Thanks in advance for any input!

