texture
TypeScriptget texture(): (CustomMaterial_CustomMaterialTexture) | nullSwift declarationvar texture: CustomMaterial.Texture?The base color as a UV-mapped image.
struct · iOS 15.0+ · SDK 27.1
struct BaseColorAn object that defines an entity’s base color. For more information on using base color values in a custom material, see ``CustomMaterial/baseColor-swift.property``.
get texture(): (CustomMaterial_CustomMaterialTexture) | nullSwift declarationvar texture: CustomMaterial.Texture?The base color as a UV-mapped image.
set texture(value: (CustomMaterial_CustomMaterialTexture) | null)Swift declarationvar texture: CustomMaterial.Texture?The base color as a UV-mapped image.
static init(value: PhysicallyBasedMaterial_BaseColor): CustomMaterial_BaseColorSwift declarationinit(_ value: PhysicallyBasedMaterial.BaseColor)Creates a custom base color object from an existing physically based material’s base color object. Use this initializer to create a ``CustomMaterial/BaseColor-swift.struct`` that contains the same tint and texture values as an existing ``PhysicallyBasedMaterial/BaseColor-swift.struct`` object. Both `tint` and `texture` from the ``PhysicallyBasedMaterial/BaseColor-swift.struct`` object are available in your surface shader, but RealityKit doesn’t automatically use those values to render the entity. Your surface shader needs to calculate the final base color value for each pixel and assign it by calling `params.surface().set_base_color()`. For more information on creating custom materials and writing shader functions, see <doc:modifying-realitykit-rendering-using-custom-materials>. - Parameters: - value: The base color object from a physically based material.
No declarations were skipped in this snapshot.