<!--
{
  "documentType" : "article",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/scene-content-materials-and-shaders",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Materials, textures, and shaders"
}
-->

# Materials, textures, and shaders

Apply textures to the surface of your scene’s 3D objects to give each object a unique appearance.

## Overview

Materials define the appearance of 3D models in RealityKit, by defining how their surfaces interact with light. Materials can also occlude objects behind them, hold shaders, or act as portals to view other worlds with [`PortalMaterial`](/documentation/RealityKit/PortalMaterial).

RealityKit includes a few material types to help you get started, including [`SimpleMaterial`](/documentation/RealityKit/SimpleMaterial) for basic color and textures, and [`PhysicallyBasedMaterial`](/documentation/RealityKit/PhysicallyBasedMaterial) for realistic lighting effects such as reflections, roughness, and emission.

## Topics

### Simple materials

  <doc://com.apple.documentation/documentation/visionOS/creating-3d-entities-with-realitykit>

[`struct SimpleMaterial`](/documentation/RealityKit/SimpleMaterial)

A basic material that responds to lights in the scene.

[`typealias BaseColor`](/documentation/RealityKit/SimpleMaterial/BaseColor-swift.typealias)

The type used to represent base color.

[`typealias Texture`](/documentation/RealityKit/SimpleMaterial/Texture)

The type used to represent textures.

[`typealias FaceCulling`](/documentation/RealityKit/SimpleMaterial/FaceCulling-swift.typealias)

An alias for the cull mode object that’s appropriate for this material class.

[`typealias TriangleFillMode`](/documentation/RealityKit/SimpleMaterial/TriangleFillMode-swift.typealias)

### Unlit materials

[`struct UnlitMaterial`](/documentation/RealityKit/UnlitMaterial)

A material that doesn’t respond to lights in the scene.

[`typealias BaseColor`](/documentation/RealityKit/UnlitMaterial/BaseColor-swift.typealias)

The type used to represent base color.

[`typealias Blending`](/documentation/RealityKit/UnlitMaterial/Blending-swift.typealias)

The type used to represent opacity information.

[`typealias Texture`](/documentation/RealityKit/UnlitMaterial/Texture)

The type used to represent textures.

[`typealias FaceCulling`](/documentation/RealityKit/UnlitMaterial/FaceCulling-swift.typealias)

An alias for the cull mode object that’s appropriate for this material class.

[`typealias TextureCoordinateTransform`](/documentation/RealityKit/UnlitMaterial/TextureCoordinateTransform-swift.typealias)

An alias for the texture coordinate transform that’s appropriate for this material class.

[`typealias TriangleFillMode`](/documentation/RealityKit/UnlitMaterial/TriangleFillMode-swift.typealias)

### Realistic materials

[Applying realistic material and lighting effects to entities](/documentation/RealityKit/applying-realistic-material-and-lighting-effects-to-entities)

Enhance the appearance of objects in a RealityKit scene with Physically Based Rendering
(PBR).

[Rendering high-fidelity characters](/documentation/RealityKit/rendering-high-fidelity-characters)

Configure material and lighting properties to avoid flat, dull skin and static hair on your characters.

  <doc://com.apple.documentation/documentation/visionOS/generating-procedural-textures-in-visionos>

[`struct PhysicallyBasedMaterial`](/documentation/RealityKit/PhysicallyBasedMaterial)

A material that simulates the appearance of real-world objects.

[`struct BaseColor`](/documentation/RealityKit/PhysicallyBasedMaterial/BaseColor-swift.struct)

An object that defines an entity’s base color.

[`struct Roughness`](/documentation/RealityKit/PhysicallyBasedMaterial/Roughness-swift.struct)

An object that defines the roughness of an entity’s surface.

[`struct Metallic`](/documentation/RealityKit/PhysicallyBasedMaterial/Metallic-swift.struct)

An object that defines the reflectiveness of an entity.

[`struct Normal`](/documentation/RealityKit/PhysicallyBasedMaterial/Normal-swift.struct)

An object that specifies an entity’s normal map.

[`enum Blending`](/documentation/RealityKit/PhysicallyBasedMaterial/Blending-swift.enum)

The object that defines the transparency of an entity.

[`struct AmbientOcclusion`](/documentation/RealityKit/PhysicallyBasedMaterial/AmbientOcclusion-swift.struct)

An object that defines the ambient occlusion of an entity’s surface.

[`struct Specular`](/documentation/RealityKit/PhysicallyBasedMaterial/Specular-swift.struct)

An object that defines the specular highlights of an entity.

[`struct SheenColor`](/documentation/RealityKit/PhysicallyBasedMaterial/SheenColor)

An object that defines the color of an entity’s sheen.

[`struct Clearcoat`](/documentation/RealityKit/PhysicallyBasedMaterial/Clearcoat-swift.struct)

An object that defines the intensity of an entity’s clear, shiny
coating.

[`struct ClearcoatRoughness`](/documentation/RealityKit/PhysicallyBasedMaterial/ClearcoatRoughness-swift.struct)

An object that defines the degree to which an entity’s clear, shiny
coating scatters light to create soft highlights.

[`struct AnisotropyLevel`](/documentation/RealityKit/PhysicallyBasedMaterial/AnisotropyLevel-swift.struct)

An object that defines the degree to which an entity reflects light to
create stretched or oblong highlights.

[`struct AnisotropyAngle`](/documentation/RealityKit/PhysicallyBasedMaterial/AnisotropyAngle-swift.struct)

An object used to define a material’s anisotropy angle.

[`struct EmissiveColor`](/documentation/RealityKit/PhysicallyBasedMaterial/EmissiveColor-swift.struct)

An object that defines the color of the light an entity emits.

[`typealias TextureCoordinateTransform`](/documentation/RealityKit/PhysicallyBasedMaterial/TextureCoordinateTransform-swift.typealias)

An alias for the texture coordinate transform that’s appropriate for
this material class.

[`typealias FaceCulling`](/documentation/RealityKit/PhysicallyBasedMaterial/FaceCulling-swift.typealias)

An alias for the face culling object that’s appropriate for this
material class.

[`typealias Texture`](/documentation/RealityKit/PhysicallyBasedMaterial/Texture)

The texture type to use for materials of this class.

### Portals

[`struct PortalMaterial`](/documentation/RealityKit/PortalMaterial)

A material that makes the mesh part a portal to a different world.

[`typealias FaceCulling`](/documentation/RealityKit/PortalMaterial/FaceCulling-swift.typealias)

An alias for the cull mode object that’s appropriate for this material class.

[`typealias TriangleFillMode`](/documentation/RealityKit/PortalMaterial/TriangleFillMode-swift.typealias)

An alias for the triangle fill mode object that’s appropriate for this
material class.

[`struct PortalComponent`](/documentation/RealityKit/PortalComponent)

A component that turns mesh surfaces into portals to a different world.

[`struct WorldComponent`](/documentation/RealityKit/WorldComponent)

A component that defines a portal world.

[`struct PortalCrossingComponent`](/documentation/RealityKit/PortalCrossingComponent)

A component that allows entities to cross portal boundaries.

### Texture resources

  <doc://com.apple.documentation/documentation/visionOS/generating-procedural-textures-in-visionos>

  <doc://com.apple.documentation/documentation/visionOS/displaying-a-stereoscopic-image-in-visionos>

[`class TextureResource`](/documentation/RealityKit/TextureResource)

A representation of a texture.

[`struct CreateOptions`](/documentation/RealityKit/TextureResource/CreateOptions)

An object that holds texture resource creation options.

[`typealias SamplingQuality`](/documentation/RealityKit/TextureResource/SamplingQuality)

An object for controlling the texture-sampling quality.

[`enum MipmapsMode`](/documentation/RealityKit/TextureResource/MipmapsMode)

An enumeration for specifying how to allocate and generate mipmaps for a texture.

[`enum Semantic`](/documentation/RealityKit/TextureResource/Semantic-swift.enum)

An object for specifying the intended use of a texture.

### Texture drawing

[Rendering a windowed game in stereo](/documentation/RealityKit/rendering-a-windowed-game-in-stereo)

Bring an iOS or iPadOS game to visionOS and enhance it.

[Creating a dynamic height and normal map with low-level texture](/documentation/RealityKit/creating-a-dynamic-height-map-with-low-level-texture)

Create a low-level texture and update its pixel data on the GPU to form a dynamic height and normal map.

[`class LowLevelTexture`](/documentation/RealityKit/LowLevelTexture)

A container for texture data allowing you to create and update textures using your own format.

[`struct Descriptor`](/documentation/RealityKit/LowLevelTexture/Descriptor-swift.struct)

An object that you use to configure new `LowLevelTexture` objects.

[`class Drawable`](/documentation/RealityKit/TextureResource/Drawable)

A drawable associated with a drawable queue

[`class DrawableQueue`](/documentation/RealityKit/TextureResource/DrawableQueue-swift.class)

A drawable queue that may be used to update a texture resource dynamically

[`struct Descriptor`](/documentation/RealityKit/TextureResource/DrawableQueue-swift.class/Descriptor)

Describes the texture managed by the drawable queue

### Shaders

  <doc://com.apple.documentation/documentation/visionOS/implementing-adjustable-material-in-visionos>

  <doc://com.apple.documentation/documentation/visionOS/displaying-a-stereoscopic-image-in-visionos>

[`struct ShaderGraphMaterial`](/documentation/RealityKit/ShaderGraphMaterial)

A material that comes from a shader graph in a Reality Composer Pro project, or a MaterialX shader.

[`typealias FaceCulling`](/documentation/RealityKit/ShaderGraphMaterial/FaceCulling-swift.typealias)

An alias for the cull mode object that’s appropriate for this material class.

[`typealias TriangleFillMode`](/documentation/RealityKit/ShaderGraphMaterial/TriangleFillMode-swift.typealias)

An alias for the triangle fill mode object that’s appropriate for this
material class.

[Modifying RealityKit rendering using custom materials](/documentation/RealityKit/modifying-realitykit-rendering-using-custom-materials)

Write Metal shader functions to implement custom rendering effects.

[`struct CustomMaterial`](/documentation/RealityKit/CustomMaterial)

A material that works with custom Metal shader functions.

[`struct SurfaceShader`](/documentation/RealityKit/CustomMaterial/SurfaceShader)

The custom material’s surface shader function.

[`struct GeometryModifier`](/documentation/RealityKit/CustomMaterial/GeometryModifier)

The custom material’s optional shader function that can manipulate an
entity’s vertex data.

[`protocol MaterialFunction`](/documentation/RealityKit/MaterialFunction)

The abstract superclass for objects representing compute functions for RealityKit custom materials .

[`class Program`](/documentation/RealityKit/CustomMaterial/Program-swift.class)

An object that represents the backing shader compilation required for
custom materials.

[`struct Descriptor`](/documentation/RealityKit/CustomMaterial/Program-swift.class/Descriptor-swift.struct)

An object that specifies all parameters necessary to initialize `CustomMaterial` programs

[`enum CustomShaderStage`](/documentation/RealityKit/CustomShaderStage)

### Object occlusion

  <doc://com.apple.documentation/documentation/visionOS/obscuring-virtual-items-in-a-scene-behind-real-world-items>

[`struct OcclusionMaterial`](/documentation/RealityKit/OcclusionMaterial)

An invisible material that hides objects rendered behind it.

[`typealias FaceCulling`](/documentation/RealityKit/OcclusionMaterial/FaceCulling-swift.typealias)

An alias for the cull mode object that’s appropriate for this material class.

### Video materials

[`struct VideoMaterial`](/documentation/RealityKit/VideoMaterial)

A material that supports animated textures.

[`typealias FaceCulling`](/documentation/RealityKit/VideoMaterial/FaceCulling-swift.typealias)

An alias for the cull mode object that’s appropriate for this material class.

[`typealias TriangleFillMode`](/documentation/RealityKit/VideoMaterial/TriangleFillMode-swift.typealias)

### Custom material types

[`struct Custom`](/documentation/RealityKit/CustomMaterial/Custom-swift.struct)

An object that defines the custom properties for the material.

[`struct CustomMaterialTexture`](/documentation/RealityKit/CustomMaterial/CustomMaterialTexture)

A texture object that you use to create custom materials.

[`enum LightingModel`](/documentation/RealityKit/CustomMaterial/LightingModel-swift.enum)

An object that defines how the framework renders a custom material.

[`struct BaseColor`](/documentation/RealityKit/CustomMaterial/BaseColor-swift.struct)

An object that defines an entity’s base color.

[`struct Roughness`](/documentation/RealityKit/CustomMaterial/Roughness-swift.struct)

An object that defines how the surface of an entity scatters the light
it reflects.

[`struct Metallic`](/documentation/RealityKit/CustomMaterial/Metallic-swift.struct)

An object that defines an entity’s reflectiveness.

[`struct Normal`](/documentation/RealityKit/CustomMaterial/Normal-swift.struct)

An object that stores fine surface details for an entity in an image
texture.

[`struct EmissiveColor`](/documentation/RealityKit/CustomMaterial/EmissiveColor-swift.struct)

An object that defines the color of the light an entity emits.

[`enum Blending`](/documentation/RealityKit/CustomMaterial/Blending-swift.enum)

An object that specifies the transparency of an entity.

[`struct Opacity`](/documentation/RealityKit/CustomMaterial/Opacity)

An object that defines the transparency options for a custom material.

[`struct AmbientOcclusion`](/documentation/RealityKit/CustomMaterial/AmbientOcclusion-swift.struct)

An object that defines an entity’s exposure to ambient light.

[`struct Specular`](/documentation/RealityKit/CustomMaterial/Specular-swift.struct)

An object that defines the specular highlights of an entity.

[`struct Clearcoat`](/documentation/RealityKit/CustomMaterial/Clearcoat-swift.struct)

An object that defines the intensity of an entity’s clear, shiny
coating.

[`struct ClearcoatNormal`](/documentation/RealityKit/CustomMaterial/ClearcoatNormal-swift.struct)

An object that defines the clearcoat normal map texture.

[`struct ResourceStorage`](/documentation/RealityKit/CustomMaterial/ResourceStorage)

A container for resources that will be encoded into a CustomMaterial’s custom uniforms argument buffer.

[`typealias TextureCoordinateTransform`](/documentation/RealityKit/CustomMaterial/TextureCoordinateTransform-swift.typealias)

The object type that custom material use to hold UV texture coordinates.

[`typealias FaceCulling`](/documentation/RealityKit/CustomMaterial/FaceCulling-swift.typealias)

The type of object used to control the removal of polygons that aren’t
visible to the user.

[`typealias Texture`](/documentation/RealityKit/CustomMaterial/Texture)

The object type that custom materials use to hold texture properties.

### Error types

[`enum CustomMaterialError`](/documentation/RealityKit/CustomMaterialError)

Errors generated when loading custom material functions.

### Material types

[`protocol Material`](/documentation/RealityKit/Material)

A type that describes the material aspects of a mesh, like color and
texture.

[`typealias Color`](/documentation/RealityKit/Material/Color)

An alias for the color type that’s appropriate for the current platform.

[`typealias Parameters`](/documentation/RealityKit/Material/Parameters)

The parameter type that custom materials uses for properties the
framework passes to shader functions.

[`struct MaterialParameterTypes`](/documentation/RealityKit/MaterialParameterTypes)

A set of types that material parameters can use.

[`struct MaterialParameters`](/documentation/RealityKit/MaterialParameters)

[`enum MaterialColorParameter`](/documentation/RealityKit/MaterialColorParameter)

The color parameter applied to a material.

[`enum MaterialScalarParameter`](/documentation/RealityKit/MaterialScalarParameter)

The scalar parameter applied to a material.

### Portals, clipping, and occlusion

[`struct RenderLayerComponent`](/documentation/RealityKit/RenderLayerComponent)

A component that defines which layers an entity participates in.

[`struct RenderLayer`](/documentation/RealityKit/RenderLayer)

A named identifier for a group of meshes and lights.

[`struct ClippingComponent`](/documentation/RealityKit/ClippingComponent)

A component that clips entities and their children to a customizable bounding box volume with feathered edges.

[`struct OcclusionCullingComponent`](/documentation/RealityKit/OcclusionCullingComponent)

A component that controls whether the system performs occlusion
culling on the owning Entity and its descendants.

### Decals

[`struct PhysicallyBasedDecalComponent`](/documentation/RealityKit/PhysicallyBasedDecalComponent)

A component that specifies a decal to be applied on the scene.
A decal is essentially a projective texture applied to any mesh on the scene.
The transform of the decal is inherited from the entity’s transform.
The decal is projected along the local space negative z onto the meshes within its volume.
All decal textures expect 2D texture resources.
Decal textures do not support custom sampler, UV index, or swizzle options from
[`PhysicallyBasedMaterial`](/documentation/RealityKit/PhysicallyBasedMaterial) parameter types. All textures are sampled using bilinear filtering,
projected UVs from the decal volume, and fixed channel mapping.
Decals are available on devices with Apple6 GPU family feature support.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)