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.