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.
RealityKit includes a few material types to help you get started, including SimpleMaterial for basic color and textures, and PhysicallyBasedMaterial for realistic lighting effects such as reflections, roughness, and emission.
Topics
Simple materials
Creating 3D entities with RealityKitSimpleMaterialSimpleMaterial.BaseColorSimpleMaterial.TextureSimpleMaterial.FaceCullingSimpleMaterial.TriangleFillMode
Unlit materials
UnlitMaterialUnlitMaterial.BaseColorUnlitMaterial.BlendingUnlitMaterial.TextureUnlitMaterial.FaceCullingUnlitMaterial.TextureCoordinateTransformUnlitMaterial.TriangleFillMode
Realistic materials
Applying realistic material and lighting effects to entitiesGenerating procedural texturesPhysicallyBasedMaterialPhysicallyBasedMaterial.BaseColorPhysicallyBasedMaterial.RoughnessPhysicallyBasedMaterial.MetallicPhysicallyBasedMaterial.NormalPhysicallyBasedMaterial.BlendingPhysicallyBasedMaterial.AmbientOcclusionPhysicallyBasedMaterial.SpecularPhysicallyBasedMaterial.SheenColorPhysicallyBasedMaterial.ClearcoatPhysicallyBasedMaterial.ClearcoatRoughnessPhysicallyBasedMaterial.AnisotropyLevelPhysicallyBasedMaterial.AnisotropyAnglePhysicallyBasedMaterial.EmissiveColorPhysicallyBasedMaterial.TextureCoordinateTransformPhysicallyBasedMaterial.FaceCullingPhysicallyBasedMaterial.Texture
Portals
PortalMaterialPortalMaterial.FaceCullingPortalMaterial.TriangleFillModePortalComponentWorldComponentPortalCrossingComponent
Texture resources
Generating procedural texturesDisplaying a stereoscopic imageTextureResourceTextureResource.CreateOptionsTextureResource.SamplingQualityTextureResource.MipmapsModeTextureResource.Semantic
Texture drawing
Rendering a windowed game in stereoCreating a dynamic height and normal map with low-level textureLowLevelTextureLowLevelTexture.DescriptorTextureResource.DrawableTextureResource.DrawableQueueTextureResource.DrawableQueue.Descriptor
Shaders
Implementing adjustable materialDisplaying a stereoscopic imageShaderGraphMaterialShaderGraphMaterial.FaceCullingShaderGraphMaterial.TriangleFillModeModifying RealityKit rendering using custom materialsCustomMaterialCustomMaterial.SurfaceShaderCustomMaterial.GeometryModifierMaterialFunctionCustomMaterial.ProgramCustomMaterial.Program.DescriptorCustomShaderStage
Object occlusion
Obscuring virtual items in a scene behind real-world itemsOcclusionMaterialOcclusionMaterial.FaceCulling
Video materials
Custom material types
CustomMaterial.CustomCustomMaterial.CustomMaterialTextureCustomMaterial.LightingModelCustomMaterial.BaseColorCustomMaterial.RoughnessCustomMaterial.MetallicCustomMaterial.NormalCustomMaterial.EmissiveColorCustomMaterial.BlendingCustomMaterial.OpacityCustomMaterial.AmbientOcclusionCustomMaterial.SpecularCustomMaterial.ClearcoatCustomMaterial.ClearcoatNormalCustomMaterial.ResourceStorageCustomMaterial.TextureCoordinateTransformCustomMaterial.FaceCullingCustomMaterial.Texture
Error types
Material types
See Also
Scene content
Hello WorldEnabling video reflections in an immersive environmentCreating a spatial drawing app with RealityKitGenerating interactive geometry with RealityKitCombining 2D and 3D views in an immersive appTransforming RealityKit entities using gesturesResponding to gestures on an entityModels and meshesAnchorsLights and camerasContent synchronizationAudioVideosImages