One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

TextureResource.Format

struct · iOS 18.0+ · SDK 27.1

struct Format

The pixel format and encoding of a texture. The texture's format controls the sampling and conversions (if any) to use when rendering with that texture.

Members (3)

static · iOS 18.0+

raw

TypeScript
static raw(pixelFormat: _Metal_MTLPixelFormat): Promise<TextureResource_Format>
Swift declaration
static func raw(pixelFormat: MTLPixelFormat) -> TextureResource.Format

Indicates a texture for unmodified use by a shader. The created texture uses the ``RealityKit/TextureResource/Semantic-swift.enum/raw`` semantic.

static · iOS 18.0+

color

TypeScript
static color(colorSpace: TextureResource_Format_ColorSpace, pixelFormat: _Metal_MTLPixelFormat): Promise<TextureResource_Format>
Swift declaration
static func color(_ colorSpace: TextureResource.Format.ColorSpace, pixelFormat: MTLPixelFormat) -> TextureResource.Format

Indicates that a texture contains color data to interpret in a specific color space. The created texture uses the ``RealityKit/TextureResource/Semantic-swift.enum/color`` or ``RealityKit/TextureResource/Semantic-swift.enum/hdrColor`` semantic.

static · iOS 18.0+

normal

TypeScript
static normal(encoding: TextureResource_Format_NormalEncoding, pixelFormat: _Metal_MTLPixelFormat): Promise<TextureResource_Format>
Swift declaration
static func normal(_ encoding: TextureResource.Format.NormalEncoding, pixelFormat: MTLPixelFormat) -> TextureResource.Format

Indicates that a texture is a normal map. The created texture uses the ``RealityKit/TextureResource/Semantic-swift.enum/normal`` semantic.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →