Skip to content

RealityKit iOS xcode26.0 b1

Alex Soto edited this page Jun 9, 2025 · 2 revisions

#RealityKit.framework

diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitGeometryModifier.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitGeometryModifier.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitGeometryModifier.h	2025-04-19 04:30:40
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitGeometryModifier.h	2025-05-31 00:10:13
@@ -57,6 +57,7 @@
 // Geometry
 
 RK_API uint vertex_id(thread geometry_data_t &data);
+RK_API uint instance_id(thread geometry_data_t &data) RK_AVAILABILITY_IOS_19 RK_AVAILABILITY_MACOS_16;
 RK_API float3 position(thread geometry_data_t &data);
 
 RK_API float3 model_position_offset(thread geometry_data_t &data);
@@ -288,6 +289,14 @@
     RK_INLINE uint vertex_id() const thread
     {
         return geometry_modifier::api::vertex_id(data);
+    }
+    
+    /// Returns per-instance identifier, as specified by Metal.
+    ///
+    /// See `instance_id` in Metal Shading Language Section 5.2.3.1
+    RK_INLINE uint instance_id() const thread RK_AVAILABILITY_IOS_19 RK_AVAILABILITY_MACOS_16
+    {
+        return geometry_modifier::api::instance_id(data);
     }
 
     /// Position of this vertex in model-space. This will be the value originally
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitSurfaceShader.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitSurfaceShader.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitSurfaceShader.h	2025-04-19 09:45:16
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitSurfaceShader.h	2025-05-30 23:47:30
@@ -51,6 +51,8 @@
 RK_API float3 world_position(thread surface_data_t &data);
 RK_API float3 view_direction(thread surface_data_t &data);
 
+RK_API uint instance_id(thread surface_data_t &data) RK_AVAILABILITY_IOS_19 RK_AVAILABILITY_MACOS_16;
+
 RK_API float4 color(thread surface_data_t &data);
 
 RK_API float3 geometry_normal(thread surface_data_t &data);
@@ -253,6 +255,12 @@
     RK_INLINE float3 model_position() const thread
     {
         return surface::api::model_position(data);
+    }
+    
+    /// Returns the per-instance identifier, from the provoking vertex of the triangle.
+    RK_INLINE uint instance_id() const thread RK_AVAILABILITY_IOS_19 RK_AVAILABILITY_MACOS_16
+    {
+        return surface::api::instance_id(data);
     }
 
     /// Returns the fragment's interpolated vertex color.
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitTypes.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitTypes.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitTypes.h	2025-04-19 10:52:36
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/RealityKit.framework/Headers/RealityKitTypes.h	2025-05-31 00:10:13
@@ -22,11 +22,15 @@
 
 #define RK_AVAILABILITY_IOS_18 __attribute__((availability(ios, introduced=18.0, strict)))
 #define RK_AVAILABILITY_MACOS_15  __attribute__((availability(macos, introduced=15.0, strict)))
+#define RK_AVAILABILITY_IOS_19 __attribute__((availability(ios, introduced=19.0, strict)))
+#define RK_AVAILABILITY_MACOS_16  __attribute__((availability(macos, introduced=16.0, strict)))
 
 #else
 
 #define RK_AVAILABILITY_IOS_18
 #define RK_AVAILABILITY_MACOS_15
+#define RK_AVAILABILITY_IOS_19
+#define RK_AVAILABILITY_MACOS_16
 
 #endif
 namespace realitykit
Clone this wiki locally