Texture2D: Difference between revisions

From Resonite Wiki
No edit summary
 
Added section on color profiles.
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<!--T:1-->
<!--T:1-->
Texture2D is an object that contains a texture. A texture is an image that is used by [[Material|Materials]] in Resonite to customize the appearance of an object. Textures provide information about how an object should be rendered.
Texture2D is an object that contains a texture. A texture is an image that is used by [[Material|materials]] in Resonite to customize the appearance of an object. Textures provide information about how an object should be rendered.


<!--T:2-->
<!--T:2-->
Line 7: Line 7:
<!--T:3-->
<!--T:3-->
The resolution of a texture is always a power of two. For example, the resolution of a 2048x2048 texture can be represented as <!--<math>2^11*2^11</math>-->2^11x2^11. The [https://en.wikipedia.org/wiki/Color_depth bit depth] of a texture is either 8 or 16 bits. Higher bit depths are used for certain texture types that benefit from a higher level of color precision, like height and normal maps.
The resolution of a texture is always a power of two. For example, the resolution of a 2048x2048 texture can be represented as <!--<math>2^11*2^11</math>-->2^11x2^11. The [https://en.wikipedia.org/wiki/Color_depth bit depth] of a texture is either 8 or 16 bits. Higher bit depths are used for certain texture types that benefit from a higher level of color precision, like height and normal maps.
=== Color Profiles ===
Textures of all kinds support color profiles.  There's only two you need to care about:
* sRGB
* Linear
Depending on the shader, we will default different textures to a "preferred" color space in most cases that can be changed after the fact on the texture.  An example of this is the ColorSplat family of materials, where the splat map will default to Linear but can be changed at your leisure.
This has the effect of certain blending effects having different "falloffs" which may be adjusted using our built-in tools or an external one.


== See Also  == <!--T:4-->
== See Also  == <!--T:4-->
*[[StaticTexture2D (Component)]]
*[[StaticTexture2D (Component)]]
{{stub}}
{{stub}}

Latest revision as of 12:44, 4 April 2024

Texture2D is an object that contains a texture. A texture is an image that is used by materials in Resonite to customize the appearance of an object. Textures provide information about how an object should be rendered.

Materials contain one or more texture slots which can be filled with various textures. Textures may be used to supply various types of data to materials, including albedo (color), metallics, roughness, normals (surface variations), height, and more. When imported, textures are represented as a plane. Textures can be placed into various texture slots by holding them and clicking the appropriate slot in a material. Texture planes only serve to preview the texture and aren't necessary for the texture to function. After placing a texture into a texture slot, the texture plane may be deleted without consequence.

The resolution of a texture is always a power of two. For example, the resolution of a 2048x2048 texture can be represented as 2^11x2^11. The bit depth of a texture is either 8 or 16 bits. Higher bit depths are used for certain texture types that benefit from a higher level of color precision, like height and normal maps.

Color Profiles

Textures of all kinds support color profiles. There's only two you need to care about:

  • sRGB
  • Linear

Depending on the shader, we will default different textures to a "preferred" color space in most cases that can be changed after the fact on the texture. An example of this is the ColorSplat family of materials, where the splat map will default to Linear but can be changed at your leisure.

This has the effect of certain blending effects having different "falloffs" which may be adjusted using our built-in tools or an external one.

See Also

This article or section is a Stub. You can help the Resonite Wiki by expanding it.