One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

CustomMaterial.Custom

struct · iOS 15.0+ · SDK 27.1

struct Custom

An object that defines the custom properties for the material.

Members (5)

init · iOS 15.0+

init

TypeScript
static init(value?: SDKHandle, texture?: (CustomMaterial_CustomMaterialTexture) | null): CustomMaterial_Custom
Swift declaration
init(value: SIMD4<Float> = .init(repeating: 0), texture: CustomMaterial.Texture? = nil)

Creates a custom object from a vector and texture. Use this initializer to create a new ``CustomMaterial/Custom-swift.struct`` object from a four-component vector, a texture, or both. RealityKit passes these values automatically to your custom material’s shader functions. Custom values have no predefined meaning, and RealityKit doesn’t use them other than to make them available in your surface shader and geometry modifier. - Parameters: - value: A four-component vector. - texture: An optional texture.

get · iOS 15.0+

value

TypeScript
get value(): SDKHandle
Swift declaration
var value: SIMD4<Float>

A custom vector that the framework sends to the material’s shader functions.

set · iOS 15.0+

value

TypeScript
set value(value: SDKHandle)
Swift declaration
var value: SIMD4<Float>

A custom vector that the framework sends to the material’s shader functions.

get · iOS 15.0+

texture

TypeScript
get texture(): (CustomMaterial_CustomMaterialTexture) | null
Swift declaration
var texture: CustomMaterial.Texture?

A custom UV-mapped image texture that the framework sends to the material’s shader functions.

set · iOS 15.0+

texture

TypeScript
set texture(value: (CustomMaterial_CustomMaterialTexture) | null)
Swift declaration
var texture: CustomMaterial.Texture?

A custom UV-mapped image texture that the framework sends to the material’s shader functions.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →