Mipmap: Difference between revisions

From Resonite Wiki
Add info on mipmap usage for matcaps and reflections
m formatting nitpicks
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
MipMaps are pre-computed, smaller versions of textures that are shown in place of the full resolution texture at a distance and at shear angles.
'''Mipmaps''' are pre-computed, smaller versions of textures that are shown in place of the full resolution texture at a distance and at shear angles.


The [[StaticTexture2D (Component)|StaticTexture2D]] component provides some options for controlling mipmaps, including the following:
The [[StaticTexture2D (Component)|StaticTexture2D]] component provides some options for controlling mipmaps, including the following:


== MipMaps ==
== Mipmaps ==


MipMaps are enabled by default and automatically calculate for you. This will result in a roughly 36% increase of VRAM usage per texture, but MipMaps help improve performance and visual fidelity, despite the increase in VRAM usage.
Mipmaps are enabled by default and automatically calculate for you. This will result in a roughly 36% increase of VRAM usage per texture, but mipmaps help improve performance and visual fidelity, despite the increase in VRAM usage.


In some situations, such as textures or cubemaps used in [[Projection360Material (Component)|Projection360]] materials, MipMaps are practically never seen. In these situations, you can safely disable MipMaps to reduce overall VRAM usage. This is most common with Skyboxes.
In some situations, such as textures or cubemaps used in [[Projection360Material (Component)|Projection360]] materials, mipmaps are practically never seen. In these situations, you can safely disable mipmaps to reduce overall VRAM usage. This is most common with skyboxes.


Some exceptions where you still want to keep MipMaps enabled:
However, there are some exceptions where you still want to keep mipmaps enabled:
* [[PBS_Metallic (Component)|PBS Metallic]] samples MipMaps from the cubemap on [[ReflectionProbe (Component)|Reflection Probes]] for different smoothness values
 
* [[XiexeToonMaterial (Component)|Xiexe Toon]] samples MipMaps from the matcap texture for different glossiness values.
* [[Component:PBS_Metallic|PBS Metallic]] samples mipmaps from the cubemap on [[Component:ReflectionProbe|reflection probes]] for different smoothness values
* [[Component:XiexeToonMaterial|Xiexe Toon]] samples mipmaps from the matcap texture for different glossiness values.


== MipMapBias ==
== MipMapBias ==


The bias of the MipMaps refers to how "far away" the MipMaps will be seen from. Decreasing the bias will "push" MipMaps further away, while increasing the bias will "pull" them closer. This can help alleviate textures being sharper or blurrier than intended at a distance and at harsh angles.
The bias of the mipmaps refers to how "far away" the mipmaps will be seen from. Decreasing the bias will "push" mipmaps further away, while increasing the bias will "pull" them closer. This can help alleviate textures being sharper or blurrier than intended at a distance and at harsh angles.


== KeepOriginalMipMaps ==
== KeepOriginalMipMaps ==


dds texture files can contain MipMaps. Enabling this option will use the MipMaps provided in a dds file instead of the MipMaps that are computed for you. This has no effect on other image formats.
DDS texture files can contain mipmaps. Enabling this option will use the mipmaps provided in a DDS file instead of the mipmaps that are computed for you. This has no effect on other image formats.


== MipMapFilter ==
== MipMapFilter ==


The filter type determines how textures are downscaled for their MipMap creation. This has no impact on general performance, only the initial generation of the MipMaps.
The filter type determines how textures are downscaled for their mipmap creation. This has no impact on general performance, only the initial generation of the mipmaps.


=== Bilinear ===
=== Bilinear ===
Line 35: Line 36:
=== Lanczos3 ===
=== Lanczos3 ===


Sharpest filtering option. This option can provide the sharpest MipMaps out of the available options, but takes longer to generate and often looks identical to Box filtering.
Sharpest filtering option. This option can provide the sharpest mipmaps out of the available options, but takes longer to generate and often looks identical to Box filtering.


== Sources ==
== References ==


* https://docs.unity3d.com/6000.2/Documentation/Manual/texture-mipmaps-introduction.html
* https://docs.unity3d.com/6000.2/Documentation/Manual/texture-mipmaps-introduction.html

Latest revision as of 00:49, 11 November 2025

Mipmaps are pre-computed, smaller versions of textures that are shown in place of the full resolution texture at a distance and at shear angles.

The StaticTexture2D component provides some options for controlling mipmaps, including the following:

Mipmaps

Mipmaps are enabled by default and automatically calculate for you. This will result in a roughly 36% increase of VRAM usage per texture, but mipmaps help improve performance and visual fidelity, despite the increase in VRAM usage.

In some situations, such as textures or cubemaps used in Projection360 materials, mipmaps are practically never seen. In these situations, you can safely disable mipmaps to reduce overall VRAM usage. This is most common with skyboxes.

However, there are some exceptions where you still want to keep mipmaps enabled:

MipMapBias

The bias of the mipmaps refers to how "far away" the mipmaps will be seen from. Decreasing the bias will "push" mipmaps further away, while increasing the bias will "pull" them closer. This can help alleviate textures being sharper or blurrier than intended at a distance and at harsh angles.

KeepOriginalMipMaps

DDS texture files can contain mipmaps. Enabling this option will use the mipmaps provided in a DDS file instead of the mipmaps that are computed for you. This has no effect on other image formats.

MipMapFilter

The filter type determines how textures are downscaled for their mipmap creation. This has no impact on general performance, only the initial generation of the mipmaps.

Bilinear

Softest filtering option, This option blurs the image with bilinear interpolation.

Box

Default for all 2D textures. This is the fastest option as no interpolation is involved and provides a balance between smoothness and sharpness.

Lanczos3

Sharpest filtering option. This option can provide the sharpest mipmaps out of the available options, but takes longer to generate and often looks identical to Box filtering.

References