Gothic-UnZENity-Project / Gothic-UnZENity

Community rebuild of classical Gothic 1 and 2 in Unity engine. Currently focusing on a native VR implementation.
GNU General Public License v3.0
10 stars 2 forks source link

Handle high resolution textures #130

Open ThomasMountainborn opened 2 months ago

ThomasMountainborn commented 2 months ago

In Gothic 2, there is a single 2k texture. The most common texture size is 512. Here's a breakdown of the texture sizes in Gothic 2:

image

To make good use of system memory, the texture arrays are clamped to 512. For reference, having the Gothic 2 texture array at 512 uses 309MB, if it were 2k it's 2.7 GB.

The clamping of the texture size means that we lose fidelity on those few textures that are larger. To address this, we need to separate out the polygons that use high resolution textures from the mesh chunks, and assign them the unique textures that would then no longer be part of the array.