2025 Graphics & Games
WWDC25 · 28 min · Graphics & Games
Bring your SceneKit project to RealityKit
Understand SceneKit deprecation and explore how to transition your 3D projects to RealityKit, Apple’s recommended high-level 3D engine. We’ll clarify what SceneKit deprecation means for your projects, compare key concepts between the two engines, and show you how to port a sample SceneKit game to RealityKit. We’ll also explore the potential of RealityKit across all supported platforms to help you create amazing 3D experiences with your apps and games.
Watch at developer.apple.com ↗Chapters
Code shown on screen · 3 snippets
Animations in RealityKit
// RealityKit
guard let max = scene.findEntity(named: "Max") else { return }
guard let library = max.components[AnimationLibraryComponent.self],
let spinAnimation = library.animations["spin"]
else { return }
max.playAnimation(spinAnimation) Directional Light Component in RealityKit
// RealityKit
let lightEntity = Entity(components:
DirectionalLightComponent(),
DirectionalLightComponent.Shadow()
) Create Bloom effect using RealityKit Post processing API
final class BloomPostProcess: PostProcessEffect {
let bloomThreshold: Float = 0.5
let bloomBlurRadius: Float = 15.0
func postProcess(context: borrowing PostProcessEffectContext<any MTLCommandBuffer>) {
// Create metal texture of the same format as 'context.sourceColorTexture'.
var bloomTexture = ...
// Write brightest parts of 'context.sourceColorTexture' to 'bloomTexture'
// using 'MPSImageThresholdToZero'.
// Blur 'bloomTexture' in-place using 'MPSImageGaussianBlur'.
// Combine original 'context.sourceColorTexture' and 'bloomTexture'
// using 'MPSImageAdd', and write to 'context.targetColorTexture'.
}
}
// RealityKit
content.renderingEffects.customPostProcessing = .effect(
BloomPostProcess()
) Resources
Related sessions
-
26 min -
35 min -
21 min -
23 min