├── .gitignore ├── Packages └── RealityKitContent │ ├── Package.realitycomposerpro │ ├── ProjectData │ │ └── main.json │ └── WorkspaceData │ │ ├── SceneMetadataList.json │ │ ├── Settings.rcprojectdata │ │ └── ynaga.rcuserdata │ ├── Package.swift │ ├── README.md │ └── Sources │ └── RealityKitContent │ ├── RealityKitContent.rkassets │ ├── Ex01.usda │ ├── Ex02.usda │ ├── Ex03.usda │ ├── Ex04.usda │ ├── Ex05.usda │ ├── Ex06.usda │ ├── Models │ │ ├── frame1x0_5m.usdz │ │ ├── jewel.usdz │ │ ├── jewel1.usdz │ │ ├── plane1mx0_5m.usdz │ │ ├── plane1mx1m.usdz │ │ └── warphole.usdz │ ├── ParticleEmitterPresetTextures │ │ ├── flare.exr │ │ └── twinkle.exr │ └── Textures │ │ ├── girl.jpg │ │ ├── girl.png │ │ ├── girlgray.jpg │ │ ├── masume1024_001S.png │ │ ├── nebula_volume.ktx │ │ └── roomtexture2.png │ └── RealityKitContent.swift ├── README.md ├── ShaderGraphByExamples.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── ShaderGraphByExamples ├── App │ ├── AppConstant.swift │ ├── ExampleList.swift │ └── ShaderGraphByExamplesApp.swift ├── AppModel │ └── AppModel.swift ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.solidimagestack │ │ ├── Back.solidimagestacklayer │ │ │ ├── Content.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── appicon_MB.png │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── Front.solidimagestacklayer │ │ │ ├── Content.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── appicon_F.png │ │ │ └── Contents.json │ │ └── Middle.solidimagestacklayer │ │ │ ├── Content.imageset │ │ │ ├── Contents.json │ │ │ └── appicon_MB.png │ │ │ └── Contents.json │ ├── Contents.json │ ├── ex01.imageset │ │ ├── Contents.json │ │ └── ex01.heic │ ├── ex02.imageset │ │ ├── Contents.json │ │ └── ex02.png │ ├── ex03.imageset │ │ ├── Contents.json │ │ └── ex03.heic │ ├── ex04.imageset │ │ ├── Contents.json │ │ └── ex04.heic │ ├── ex05.imageset │ │ ├── Contents.json │ │ └── ex05.heic │ └── ex06.imageset │ │ ├── Contents.json │ │ └── ex06.heic ├── Info.plist ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Utilities │ └── Logger │ │ └── Logger+Extensions.swift └── Views │ ├── ContentView.swift │ ├── ExampleItem.swift │ ├── ExampleView.swift │ └── ImmersiveView.swift └── img ├── appledepthpro.jpg ├── banner.heic ├── blendersbs.jpg ├── depthprobinary.jpg ├── ex01.heic ├── ex02.heic ├── ex03.heic ├── ex04.heic ├── ex05.heic ├── ex06.heic └── howtocreate3dtexture.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | .DS_Store 6 | README.md~ 7 | .gitignore~ 8 | 9 | ## User settings 10 | xcuserdata/ 11 | 12 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 13 | *.xcscmblueprint 14 | *.xccheckout 15 | 16 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 17 | build/ 18 | DerivedData/ 19 | *.moved-aside 20 | *.pbxuser 21 | !default.pbxuser 22 | *.mode1v3 23 | !default.mode1v3 24 | *.mode2v3 25 | !default.mode2v3 26 | *.perspectivev3 27 | !default.perspectivev3 28 | 29 | ## Obj-C/Swift specific 30 | *.hmap 31 | 32 | ## App packaging 33 | *.ipa 34 | *.dSYM.zip 35 | *.dSYM 36 | 37 | ## Playgrounds 38 | timeline.xctimeline 39 | playground.xcworkspace 40 | 41 | # Swift Package Manager 42 | # 43 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 44 | # Packages/ 45 | # Package.pins 46 | # Package.resolved 47 | # *.xcodeproj 48 | # 49 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 50 | # hence it is not needed unless you have added a package configuration file to your project 51 | # .swiftpm 52 | 53 | .build/ 54 | 55 | # CocoaPods 56 | # 57 | # We recommend against adding the Pods directory to your .gitignore. However 58 | # you should judge for yourself, the pros and cons are mentioned at: 59 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 60 | # 61 | # Pods/ 62 | # 63 | # Add this line if you want to avoid checking in source code from the Xcode workspace 64 | # *.xcworkspace 65 | 66 | # Carthage 67 | # 68 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 69 | # Carthage/Checkouts 70 | 71 | Carthage/Build/ 72 | 73 | # Accio dependency management 74 | Dependencies/ 75 | .accio/ 76 | 77 | # fastlane 78 | # 79 | # It is recommended to not store the screenshots in the git repo. 80 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 81 | # For more information about the recommended setup visit: 82 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 83 | 84 | fastlane/report.xml 85 | fastlane/Preview.html 86 | fastlane/screenshots/**/*.png 87 | fastlane/test_output 88 | 89 | # Code Injection 90 | # 91 | # After new code Injection tools there's a generated folder /iOSInjectionProject 92 | # https://github.com/johnno1962/injectionforxcode 93 | 94 | iOSInjectionProject/ 95 | 96 | -------------------------------------------------------------------------------- /Packages/RealityKitContent/Package.realitycomposerpro/ProjectData/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "pathsToIds" : { 3 | "\/RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/GridMaterial.usda" : "CB766F92-EE55-4A63-9401-E7B8C009764D", 4 | "\/RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Immersive.usda" : "65F6F990-A780-4474-B78B-572E0E4E273D", 5 | "\/RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Scene.usda" : "0A9B4653-B11E-4D6A-850E-C6FCB621626C", 6 | "\/RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Untitled Scene.usda" : "D560BB77-AAF3-4BDE-B7C4-989332A4688B", 7 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Ex01.usda" : "FBFFEBEA-B32F-4413-BAA0-6DC996551A82", 8 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Ex02.usda" : "9901D49B-A0A7-408B-B62C-BA50B672ECCA", 9 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Ex03.usda" : "663CF7E5-36B8-49FD-8229-85994D11C9C2", 10 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Ex04.usda" : "C4AAC052-461E-4693-8E7F-C838612D1520", 11 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Ex05.usda" : "D6A5D356-228B-49B1-8379-DC92AA5AA057", 12 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Ex06.usda" : "234537A4-2F24-4D42-9CFE-F0FF0B3E2FA7", 13 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/ExAdv01.usda" : "82DC4AF2-611D-459F-AA26-C8D1681990F4", 14 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/GridMaterial.usda" : "66168B71-AB05-424E-8B6C-D33D6E61B08F", 15 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Immersive.usda" : "AF09ED6F-1707-48FD-8720-65B998362C09", 16 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Models\/Untitled%20Scene.usda" : "28A1C3C8-CA45-43DC-A890-E386727ECB4B", 17 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Scene.usda" : "D66134B1-3681-4A8E-AFE5-29F257229F3B", 18 | "RealityKitContent\/Sources\/RealityKitContent\/RealityKitContent.rkassets\/Scenes\/ExAdv01.usda" : "ACAC4535-8279-450C-8A52-4EA9A007CD4E" 19 | } 20 | } -------------------------------------------------------------------------------- /Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/SceneMetadataList.json: -------------------------------------------------------------------------------- 1 | { 2 | "0A9B4653-B11E-4D6A-850E-C6FCB621626C" : { 3 | "objectMetadataList" : [ 4 | [ 5 | "0A9B4653-B11E-4D6A-850E-C6FCB621626C", 6 | "Root" 7 | ], 8 | { 9 | "isExpanded" : true, 10 | "isLocked" : false 11 | } 12 | ] 13 | }, 14 | "234537A4-2F24-4D42-9CFE-F0FF0B3E2FA7" : { 15 | "objectMetadataList" : [ 16 | [ 17 | "234537A4-2F24-4D42-9CFE-F0FF0B3E2FA7", 18 | "Root", 19 | "plane1mx1m", 20 | "Geom" 21 | ], 22 | { 23 | "isExpanded" : true, 24 | "isLocked" : false 25 | }, 26 | [ 27 | "234537A4-2F24-4D42-9CFE-F0FF0B3E2FA7", 28 | "Root" 29 | ], 30 | { 31 | "isExpanded" : true, 32 | "isLocked" : false 33 | }, 34 | [ 35 | "234537A4-2F24-4D42-9CFE-F0FF0B3E2FA7", 36 | "Root", 37 | "StereoMaterial" 38 | ], 39 | { 40 | "isExpanded" : true, 41 | "isLocked" : false 42 | }, 43 | [ 44 | "234537A4-2F24-4D42-9CFE-F0FF0B3E2FA7", 45 | "Root", 46 | "plane1mx1m" 47 | ], 48 | { 49 | "isExpanded" : true, 50 | "isLocked" : false 51 | } 52 | ] 53 | }, 54 | "28A1C3C8-CA45-43DC-A890-E386727ECB4B" : { 55 | "objectMetadataList" : [ 56 | [ 57 | "28A1C3C8-CA45-43DC-A890-E386727ECB4B", 58 | "Root" 59 | ], 60 | { 61 | "isExpanded" : true, 62 | "isLocked" : false 63 | }, 64 | [ 65 | "28A1C3C8-CA45-43DC-A890-E386727ECB4B", 66 | "Root", 67 | "plane1mx0_5mDFB" 68 | ], 69 | { 70 | "isExpanded" : true, 71 | "isLocked" : false 72 | } 73 | ] 74 | }, 75 | "65F6F990-A780-4474-B78B-572E0E4E273D" : { 76 | "objectMetadataList" : [ 77 | [ 78 | "65F6F990-A780-4474-B78B-572E0E4E273D", 79 | "Root" 80 | ], 81 | { 82 | "isExpanded" : true, 83 | "isLocked" : false 84 | } 85 | ] 86 | }, 87 | "66168B71-AB05-424E-8B6C-D33D6E61B08F" : { 88 | "objectMetadataList" : [ 89 | [ 90 | "66168B71-AB05-424E-8B6C-D33D6E61B08F", 91 | "Root" 92 | ], 93 | { 94 | "isExpanded" : true, 95 | "isLocked" : false 96 | } 97 | ] 98 | }, 99 | "663CF7E5-36B8-49FD-8229-85994D11C9C2" : { 100 | "objectMetadataList" : [ 101 | [ 102 | "663CF7E5-36B8-49FD-8229-85994D11C9C2", 103 | "Root" 104 | ], 105 | { 106 | "isExpanded" : true, 107 | "isLocked" : false 108 | }, 109 | [ 110 | "663CF7E5-36B8-49FD-8229-85994D11C9C2", 111 | "Root", 112 | "MatOuter" 113 | ], 114 | { 115 | "isExpanded" : true, 116 | "isLocked" : false 117 | }, 118 | [ 119 | "663CF7E5-36B8-49FD-8229-85994D11C9C2", 120 | "Root", 121 | "jewel1" 122 | ], 123 | { 124 | "isExpanded" : true, 125 | "isLocked" : false 126 | }, 127 | [ 128 | "663CF7E5-36B8-49FD-8229-85994D11C9C2", 129 | "Root", 130 | "jewel1", 131 | "Geom" 132 | ], 133 | { 134 | "isExpanded" : true, 135 | "isLocked" : false 136 | }, 137 | [ 138 | "663CF7E5-36B8-49FD-8229-85994D11C9C2", 139 | "Root", 140 | "MatJewel" 141 | ], 142 | { 143 | "isExpanded" : true, 144 | "isLocked" : false 145 | } 146 | ] 147 | }, 148 | "82DC4AF2-611D-459F-AA26-C8D1681990F4" : { 149 | "objectMetadataList" : [ 150 | [ 151 | "82DC4AF2-611D-459F-AA26-C8D1681990F4", 152 | "Root", 153 | "plane1mx0_5mDFB", 154 | "env_light" 155 | ], 156 | { 157 | "disallowsFraming" : false, 158 | "isExpanded" : false, 159 | "isLocked" : false 160 | }, 161 | [ 162 | "82DC4AF2-611D-459F-AA26-C8D1681990F4", 163 | "Root", 164 | "plane1mx0_5mDFB", 165 | "Plane" 166 | ], 167 | { 168 | "isExpanded" : true, 169 | "isLocked" : false 170 | }, 171 | [ 172 | "82DC4AF2-611D-459F-AA26-C8D1681990F4", 173 | "Root", 174 | "plane", 175 | "Geom" 176 | ], 177 | { 178 | "isExpanded" : true, 179 | "isLocked" : false 180 | }, 181 | [ 182 | "82DC4AF2-611D-459F-AA26-C8D1681990F4", 183 | "Root", 184 | "InteriorMapping" 185 | ], 186 | { 187 | "isExpanded" : true, 188 | "isLocked" : false 189 | }, 190 | [ 191 | "82DC4AF2-611D-459F-AA26-C8D1681990F4", 192 | "Root" 193 | ], 194 | { 195 | "isExpanded" : true, 196 | "isLocked" : false 197 | }, 198 | [ 199 | "82DC4AF2-611D-459F-AA26-C8D1681990F4", 200 | "Root", 201 | "plane", 202 | "Materials" 203 | ], 204 | { 205 | "isExpanded" : true, 206 | "isLocked" : false 207 | } 208 | ] 209 | }, 210 | "9901D49B-A0A7-408B-B62C-BA50B672ECCA" : { 211 | "objectMetadataList" : [ 212 | [ 213 | "9901D49B-A0A7-408B-B62C-BA50B672ECCA", 214 | "Root", 215 | "warphole" 216 | ], 217 | { 218 | "isExpanded" : true, 219 | "isLocked" : false 220 | }, 221 | [ 222 | "9901D49B-A0A7-408B-B62C-BA50B672ECCA", 223 | "Root" 224 | ], 225 | { 226 | "isExpanded" : true, 227 | "isLocked" : false 228 | }, 229 | [ 230 | "9901D49B-A0A7-408B-B62C-BA50B672ECCA", 231 | "Root", 232 | "warphole", 233 | "Geom", 234 | "Cylinder" 235 | ], 236 | { 237 | "isExpanded" : true, 238 | "isLocked" : false 239 | }, 240 | [ 241 | "9901D49B-A0A7-408B-B62C-BA50B672ECCA", 242 | "Root", 243 | "warphole", 244 | "Geom" 245 | ], 246 | { 247 | "isExpanded" : true, 248 | "isLocked" : false 249 | } 250 | ] 251 | }, 252 | "ACAC4535-8279-450C-8A52-4EA9A007CD4E" : { 253 | "objectMetadataList" : [ 254 | [ 255 | "ACAC4535-8279-450C-8A52-4EA9A007CD4E", 256 | "Root" 257 | ], 258 | { 259 | "isExpanded" : true, 260 | "isLocked" : false 261 | }, 262 | [ 263 | "ACAC4535-8279-450C-8A52-4EA9A007CD4E", 264 | "Root", 265 | "InteriorMapping" 266 | ], 267 | { 268 | "isExpanded" : true, 269 | "isLocked" : false 270 | } 271 | ] 272 | }, 273 | "AF09ED6F-1707-48FD-8720-65B998362C09" : { 274 | "objectMetadataList" : [ 275 | [ 276 | "AF09ED6F-1707-48FD-8720-65B998362C09", 277 | "Root", 278 | "Sphere_Left" 279 | ], 280 | { 281 | "isExpanded" : true, 282 | "isLocked" : false 283 | }, 284 | [ 285 | "AF09ED6F-1707-48FD-8720-65B998362C09", 286 | "Root", 287 | "Sphere_Right" 288 | ], 289 | { 290 | "isExpanded" : true, 291 | "isLocked" : false 292 | }, 293 | [ 294 | "AF09ED6F-1707-48FD-8720-65B998362C09", 295 | "Root" 296 | ], 297 | { 298 | "isExpanded" : true, 299 | "isLocked" : false 300 | }, 301 | [ 302 | "AF09ED6F-1707-48FD-8720-65B998362C09", 303 | "Root", 304 | "GridMaterial" 305 | ], 306 | { 307 | "isExpanded" : true, 308 | "isLocked" : false 309 | } 310 | ] 311 | }, 312 | "C4AAC052-461E-4693-8E7F-C838612D1520" : { 313 | "objectMetadataList" : [ 314 | [ 315 | "C4AAC052-461E-4693-8E7F-C838612D1520", 316 | "Root" 317 | ], 318 | { 319 | "isExpanded" : true, 320 | "isLocked" : false 321 | }, 322 | [ 323 | "C4AAC052-461E-4693-8E7F-C838612D1520", 324 | "Root", 325 | "VolumetricMaterial" 326 | ], 327 | { 328 | "isExpanded" : true, 329 | "isLocked" : false 330 | } 331 | ] 332 | }, 333 | "CB766F92-EE55-4A63-9401-E7B8C009764D" : { 334 | "objectMetadataList" : [ 335 | [ 336 | "CB766F92-EE55-4A63-9401-E7B8C009764D", 337 | "Root", 338 | "GridMaterial" 339 | ], 340 | { 341 | "isExpanded" : true, 342 | "isLocked" : false 343 | }, 344 | [ 345 | "CB766F92-EE55-4A63-9401-E7B8C009764D", 346 | "Root" 347 | ], 348 | { 349 | "isExpanded" : true, 350 | "isLocked" : false 351 | } 352 | ] 353 | }, 354 | "D560BB77-AAF3-4BDE-B7C4-989332A4688B" : { 355 | "objectMetadataList" : [ 356 | 357 | ] 358 | }, 359 | "D66134B1-3681-4A8E-AFE5-29F257229F3B" : { 360 | "objectMetadataList" : [ 361 | [ 362 | "D66134B1-3681-4A8E-AFE5-29F257229F3B", 363 | "Root" 364 | ], 365 | { 366 | "isExpanded" : true, 367 | "isLocked" : false 368 | }, 369 | [ 370 | "D66134B1-3681-4A8E-AFE5-29F257229F3B", 371 | "Root", 372 | "GridMaterial", 373 | "GridMaterial" 374 | ], 375 | { 376 | "isExpanded" : true, 377 | "isLocked" : false 378 | } 379 | ] 380 | }, 381 | "D6A5D356-228B-49B1-8379-DC92AA5AA057" : { 382 | "objectMetadataList" : [ 383 | [ 384 | "D6A5D356-228B-49B1-8379-DC92AA5AA057", 385 | "Root" 386 | ], 387 | { 388 | "isExpanded" : true, 389 | "isLocked" : false 390 | }, 391 | [ 392 | "D6A5D356-228B-49B1-8379-DC92AA5AA057", 393 | "Root", 394 | "MaterialDepth" 395 | ], 396 | { 397 | "isExpanded" : true, 398 | "isLocked" : false 399 | } 400 | ] 401 | }, 402 | "FBFFEBEA-B32F-4413-BAA0-6DC996551A82" : { 403 | "objectMetadataList" : [ 404 | [ 405 | "FBFFEBEA-B32F-4413-BAA0-6DC996551A82", 406 | "Root" 407 | ], 408 | { 409 | "isExpanded" : true, 410 | "isLocked" : false 411 | } 412 | ] 413 | } 414 | } -------------------------------------------------------------------------------- /Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/Settings.rcprojectdata: -------------------------------------------------------------------------------- 1 | { 2 | "cameraPresets" : { 3 | 4 | }, 5 | "secondaryToolbarData" : { 6 | "isGridVisible" : false 7 | }, 8 | "unitDefaults" : { 9 | "kg" : "g", 10 | "kg⋅m²" : "kg⋅m²", 11 | "m" : "cm", 12 | "m\/s" : "m\/s", 13 | "m\/s²" : "m\/s²", 14 | "s" : "s", 15 | "°" : "°" 16 | } 17 | } -------------------------------------------------------------------------------- /Packages/RealityKitContent/Package.realitycomposerpro/WorkspaceData/ynaga.rcuserdata: -------------------------------------------------------------------------------- 1 | { 2 | "advancedEditorSelectedIdentifier" : "ShaderGraphEditorPluginID", 3 | "openSceneRelativePaths" : [ 4 | "Ex01.usda", 5 | "Ex02.usda", 6 | "Ex03.usda", 7 | "Ex04.usda", 8 | "Ex05.usda", 9 | "Ex06.usda" 10 | ], 11 | "recentIdentifiers" : { 12 | "234537A4-2F24-4D42-9CFE-F0FF0B3E2FA7" : [ 13 | 14 | ], 15 | "663CF7E5-36B8-49FD-8229-85994D11C9C2" : [ 16 | 17 | ], 18 | "82DC4AF2-611D-459F-AA26-C8D1681990F4" : [ 19 | 20 | ], 21 | "ACAC4535-8279-450C-8A52-4EA9A007CD4E" : [ 22 | 23 | ], 24 | "C4AAC052-461E-4693-8E7F-C838612D1520" : [ 25 | 26 | ], 27 | "D6A5D356-228B-49B1-8379-DC92AA5AA057" : [ 28 | 29 | ] 30 | }, 31 | "sceneCameraHistory" : { 32 | "234537A4-2F24-4D42-9CFE-F0FF0B3E2FA7" : [ 33 | { 34 | "date" : 753532155.235264, 35 | "title" : "Untitled", 36 | "transform" : [ 37 | 0.97710264, 38 | -1.4924545e-09, 39 | -0.212769, 40 | 0, 41 | -0.0064203884, 42 | 0.9995446, 43 | -0.029484443, 44 | 0, 45 | 0.21267214, 46 | 0.030175373, 47 | 0.9766577, 48 | 0, 49 | 0.28179222, 50 | 0.03998269, 51 | 1.2940788, 52 | 1 53 | ] 54 | }, 55 | { 56 | "date" : 753532154.203757, 57 | "title" : "Untitled", 58 | "transform" : [ 59 | 0.9774449, 60 | -1.8867465e-09, 61 | -0.21119092, 62 | 0, 63 | -0.006372769, 64 | 0.9995446, 65 | -0.029494772, 66 | 0, 67 | 0.21109478, 68 | 0.030175373, 69 | 0.97699976, 70 | 0, 71 | 0.27970222, 72 | 0.0399827, 73 | 1.2945323, 74 | 1 75 | ] 76 | }, 77 | { 78 | "date" : 753532134.502355, 79 | "title" : "Untitled", 80 | "transform" : [ 81 | 0.94909513, 82 | -2.0369662e-09, 83 | -0.31498966, 84 | 0, 85 | 0.0054418594, 86 | 0.99985075, 87 | 0.01639687, 88 | 0, 89 | 0.3149427, 90 | -0.017276334, 91 | 0.9489535, 92 | 0, 93 | 0.41730148, 94 | -0.02289118, 95 | 1.2573707, 96 | 1 97 | ] 98 | }, 99 | { 100 | "date" : 753532130.117608, 101 | "title" : "Untitled", 102 | "transform" : [ 103 | 0.949079, 104 | -1.3034498e-09, 105 | -0.31503832, 106 | 0, 107 | -0.0027168195, 108 | 0.9999628, 109 | -0.008184634, 110 | 0, 111 | 0.3150266, 112 | 0.008623753, 113 | 0.9490437, 114 | 0, 115 | 0.4174127, 116 | 0.011426634, 117 | 1.2574903, 118 | 1 119 | ] 120 | }, 121 | { 122 | "date" : 753532101.733677, 123 | "title" : "Untitled", 124 | "transform" : [ 125 | 0.97047544, 126 | -1.2541204e-09, 127 | -0.24120018, 128 | 0, 129 | -0.002893999, 130 | 0.99992806, 131 | -0.011644069, 132 | 0, 133 | 0.24118282, 134 | 0.011998302, 135 | 0.9704056, 136 | 0, 137 | 0.3195691, 138 | 0.015897939, 139 | 1.285795, 140 | 1 141 | ] 142 | }, 143 | { 144 | "date" : 753532099.348511, 145 | "title" : "Untitled", 146 | "transform" : [ 147 | 0.93782556, 148 | -2.0599655e-09, 149 | -0.34710696, 150 | 0, 151 | 0.002541397, 152 | 0.99997324, 153 | 0.0068664397, 154 | 0, 155 | 0.34709764, 156 | -0.00732167, 157 | 0.93780047, 158 | 0, 159 | 0.45990708, 160 | -0.009701174, 161 | 1.2425928, 162 | 1 163 | ] 164 | }, 165 | { 166 | "date" : 753532085.397527, 167 | "title" : "Untitled", 168 | "transform" : [ 169 | 0.96700495, 170 | -1.5112755e-09, 171 | -0.25475776, 172 | 0, 173 | -0.0071825343, 174 | 0.9996025, 175 | -0.027263323, 176 | 0, 177 | 0.2546565, 178 | 0.028193561, 179 | 0.96662056, 180 | 0, 181 | 0.33742183, 182 | 0.037356783, 183 | 1.2807797, 184 | 1 185 | ] 186 | }, 187 | { 188 | "date" : 753531894.117067, 189 | "title" : "Untitled", 190 | "transform" : [ 191 | 0.9989157, 192 | -1.4410704e-09, 193 | 0.046555713, 194 | 0, 195 | -0.0011101987, 196 | 0.9997157, 197 | 0.023820758, 198 | 0, 199 | -0.04654248, 200 | -0.023846626, 201 | 0.9986317, 202 | 0, 203 | -0.08357315, 204 | -0.042819623, 205 | 1.7931746, 206 | 1 207 | ] 208 | }, 209 | { 210 | "date" : 753531858.058879, 211 | "title" : "Untitled", 212 | "transform" : [ 213 | 0.9967527, 214 | -8.643166e-10, 215 | -0.08052398, 216 | 0, 217 | -0.017130107, 218 | 0.97711045, 219 | -0.21204214, 220 | 0, 221 | 0.07868083, 222 | 0.21273296, 223 | 0.97393745, 224 | 0, 225 | 0.14128177, 226 | 0.3819901, 227 | 1.7488328, 228 | 1 229 | ] 230 | }, 231 | { 232 | "date" : 753531702.916736, 233 | "title" : "Untitled", 234 | "transform" : [ 235 | 0.9967527, 236 | -8.643166e-10, 237 | -0.08052398, 238 | 0, 239 | -0.017130107, 240 | 0.97711045, 241 | -0.21204214, 242 | 0, 243 | 0.07868083, 244 | 0.21273296, 245 | 0.97393745, 246 | 0, 247 | 0.20349221, 248 | 0.5501913, 249 | 2.5188942, 250 | 1 251 | ] 252 | } 253 | ], 254 | "663CF7E5-36B8-49FD-8229-85994D11C9C2" : [ 255 | { 256 | "date" : 752838361.027908, 257 | "title" : "Untitled", 258 | "transform" : [ 259 | -0.984364, 260 | -1.3290589e-08, 261 | 0.17614657, 262 | 0, 263 | -0.036145866, 264 | 0.9787194, 265 | -0.20199475, 266 | 0, 267 | -0.1723979, 268 | -0.20520331, 269 | -0.9634161, 270 | 0, 271 | -0.2114984, 272 | -0.250615, 273 | -1.3130293, 274 | 1 275 | ] 276 | }, 277 | { 278 | "date" : 752838335.422127, 279 | "title" : "Untitled", 280 | "transform" : [ 281 | 0.9999605, 282 | -1.556654e-08, 283 | -0.008891588, 284 | 0, 285 | 9.562761e-06, 286 | 0.99999946, 287 | 0.0010744696, 288 | 0, 289 | 0.008891424, 290 | -0.0010744947, 291 | 0.9999599, 292 | 0, 293 | -0.011063731, 294 | 0.026134355, 295 | 1.3530631, 296 | 1 297 | ] 298 | }, 299 | { 300 | "date" : 752838329.101062, 301 | "title" : "Untitled", 302 | "transform" : [ 303 | 0.97815853, 304 | -1.5574331e-08, 305 | 0.20786017, 306 | 0, 307 | 0.0057323757, 308 | 0.99961966, 309 | -0.02697565, 310 | 0, 311 | -0.20778127, 312 | 0.027578013, 313 | 0.9777864, 314 | 0, 315 | -0.30353504, 316 | 0.06488735, 317 | 1.3172855, 318 | 1 319 | ] 320 | }, 321 | { 322 | "date" : 752838325.387655, 323 | "title" : "Untitled", 324 | "transform" : [ 325 | 0.089284174, 326 | -1.566986e-08, 327 | 0.9960062, 328 | 0, 329 | 0.045814168, 330 | 0.99894166, 331 | -0.0041068722, 332 | 0, 333 | -0.99495196, 334 | 0.045997888, 335 | 0.089189485, 336 | 0, 337 | -1.346851, 338 | 0.08978858, 339 | 0.09754789, 340 | 1 341 | ] 342 | }, 343 | { 344 | "date" : 752838314.015544, 345 | "title" : "Untitled", 346 | "transform" : [ 347 | 0.41282952, 348 | -1.4492665e-08, 349 | 0.9108083, 350 | 0, 351 | -0.34246242, 352 | 0.9266204, 353 | 0.15522322, 354 | 0, 355 | -0.8439736, 356 | -0.3759983, 357 | 0.38253602, 358 | 0, 359 | -1.1607786, 360 | -0.4831178, 361 | 0.5007744, 362 | 1 363 | ] 364 | }, 365 | { 366 | "date" : 752838302.652986, 367 | "title" : "Untitled", 368 | "transform" : [ 369 | -0.950174, 370 | -1.4740593e-08, 371 | -0.31172013, 372 | 0, 373 | 0.052021537, 374 | 0.98597616, 375 | -0.15857017, 376 | 0, 377 | 0.30734888, 378 | -0.1668854, 379 | -0.9368489, 380 | 0, 381 | 0.61807615, 382 | -0.2957099, 383 | -1.80991, 384 | 1 385 | ] 386 | }, 387 | { 388 | "date" : 752838248.818609, 389 | "title" : "Untitled", 390 | "transform" : [ 391 | 0.72590077, 392 | -1.2534393e-08, 393 | -0.6877994, 394 | 0, 395 | 0.073809646, 396 | 0.99422526, 397 | 0.07789839, 398 | 0, 399 | 0.68382746, 400 | -0.10731275, 401 | 0.7217091, 402 | 0, 403 | 1.0368581, 404 | -0.12268794, 405 | 1.1478021, 406 | 1 407 | ] 408 | }, 409 | { 410 | "date" : 752838227.364814, 411 | "title" : "Untitled", 412 | "transform" : [ 413 | 0.96065813, 414 | -1.4671177e-08, 415 | 0.27773377, 416 | 0, 417 | -0.11053102, 418 | 0.9173964, 419 | 0.38231763, 420 | 0, 421 | -0.25479203, 422 | -0.3979747, 423 | 0.88130426, 424 | 0, 425 | -0.43528724, 426 | -0.5767594, 427 | 1.373117, 428 | 1 429 | ] 430 | }, 431 | { 432 | "date" : 752838210.715496, 433 | "title" : "Untitled", 434 | "transform" : [ 435 | -0.927998, 436 | -2.3644493e-08, 437 | -0.37258527, 438 | 0, 439 | 0.12056732, 440 | 0.9461952, 441 | -0.30029705, 442 | 0, 443 | 0.35253844, 444 | -0.32359672, 445 | -0.8780672, 446 | 0, 447 | 0.35722294, 448 | -0.25008643, 449 | -0.79096216, 450 | 1 451 | ] 452 | }, 453 | { 454 | "date" : 752838206.812319, 455 | "title" : "Untitled", 456 | "transform" : [ 457 | 0.7806816, 458 | -8.218491e-09, 459 | -0.624929, 460 | 0, 461 | -0.050074387, 462 | 0.9967847, 463 | -0.0625546, 464 | 0, 465 | 0.62291956, 466 | 0.08012814, 467 | 0.7781714, 468 | 0, 469 | 0.5305556, 470 | 0.116047, 471 | 0.7216761, 472 | 1 473 | ] 474 | } 475 | ], 476 | "82DC4AF2-611D-459F-AA26-C8D1681990F4" : [ 477 | { 478 | "date" : 752314950.863024, 479 | "title" : "Untitled", 480 | "transform" : [ 481 | 0.98601145, 482 | -1.6670636e-08, 483 | 0.16667777, 484 | 0, 485 | -0.014658286, 486 | 0.99612546, 487 | 0.08671416, 488 | 0, 489 | -0.1660319, 490 | -0.08794434, 491 | 0.9821911, 492 | 0, 493 | -0.09395535, 494 | 0.034128774, 495 | 1.1914798, 496 | 1 497 | ] 498 | }, 499 | { 500 | "date" : 752314880.169762, 501 | "title" : "Untitled", 502 | "transform" : [ 503 | 0.99382085, 504 | -1.5651887e-08, 505 | 0.110996164, 506 | 0, 507 | 0.008244465, 508 | 0.9972376, 509 | -0.07381729, 510 | 0, 511 | -0.110689506, 512 | 0.0742763, 513 | 0.99107563, 514 | 0, 515 | -0.024489257, 516 | 0.22616717, 517 | 1.173825, 518 | 1 519 | ] 520 | }, 521 | { 522 | "date" : 752314864.59808, 523 | "title" : "Untitled", 524 | "transform" : [ 525 | 0.951516, 526 | -1.5916465e-08, 527 | 0.30759934, 528 | 0, 529 | 0.05670885, 530 | 0.9828589, 531 | -0.1754207, 532 | 0, 533 | -0.30232668, 534 | 0.18435924, 535 | 0.9352059, 536 | 0, 537 | -0.24892971, 538 | 0.35438555, 539 | 1.1144781, 540 | 1 541 | ] 542 | }, 543 | { 544 | "date" : 752314855.725349, 545 | "title" : "Untitled", 546 | "transform" : [ 547 | 0.41407105, 548 | -1.5720735e-08, 549 | 0.9102446, 550 | 0, 551 | 0.13609861, 552 | 0.988759, 553 | -0.061911285, 554 | 0, 555 | -0.9000123, 556 | 0.1495187, 557 | 0.40941647, 558 | 0, 559 | -1.0018404, 560 | 0.3139924, 561 | 0.5721377, 562 | 1 563 | ] 564 | }, 565 | { 566 | "date" : 752314811.746359, 567 | "title" : "Untitled", 568 | "transform" : [ 569 | 0.6469219, 570 | -1.6231457e-08, 571 | 0.76255614, 572 | 0, 573 | 0.03559649, 574 | 0.99890995, 575 | -0.03019852, 576 | 0, 577 | -0.761725, 578 | 0.046680447, 579 | 0.64621675, 580 | 0, 581 | -0.8275334, 582 | 0.1937571, 583 | 0.8409894, 584 | 1 585 | ] 586 | }, 587 | { 588 | "date" : 752314784.064733, 589 | "title" : "Untitled", 590 | "transform" : [ 591 | 0.9958298, 592 | -1.1672881e-08, 593 | 0.091229856, 594 | 0, 595 | 0.0029930733, 596 | 0.9994617, 597 | -0.03267029, 598 | 0, 599 | -0.09118082, 600 | 0.032807145, 601 | 0.9952938, 602 | 0, 603 | -0.0012838147, 604 | 0.1181026, 605 | 0.78708696, 606 | 1 607 | ] 608 | }, 609 | { 610 | "date" : 752313940.359779, 611 | "title" : "Untitled", 612 | "transform" : [ 613 | 0.9997881, 614 | -1.1703185e-08, 615 | -0.020582901, 616 | 0, 617 | 0.00097070466, 618 | 0.9988875, 619 | 0.047146562, 620 | 0, 621 | 0.02055995, 622 | -0.04715651, 623 | 0.99867594, 624 | 0, 625 | 0.08677929, 626 | 0.055096213, 627 | 0.78923374, 628 | 1 629 | ] 630 | }, 631 | { 632 | "date" : 752313887.996773, 633 | "title" : "Untitled", 634 | "transform" : [ 635 | 0.99837154, 636 | -1.1700813e-08, 637 | 0.057046138, 638 | 0, 639 | -0.0016285647, 640 | 0.99959236, 641 | 0.028503219, 642 | 0, 643 | -0.057022937, 644 | -0.028549656, 645 | 0.9979646, 646 | 0, 647 | 0.025352603, 648 | 0.06981186, 649 | 0.79242647, 650 | 1 651 | ] 652 | }, 653 | { 654 | "date" : 752313874.918722, 655 | "title" : "Untitled", 656 | "transform" : [ 657 | 0.9972119, 658 | -1.18901795e-08, 659 | 0.074621625, 660 | 0, 661 | -0.023304459, 662 | 0.94998264, 663 | 0.31143206, 664 | 0, 665 | -0.070889324, 666 | -0.31230274, 667 | 0.947334, 668 | 0, 669 | 0.012351482, 670 | -0.15818852, 671 | 0.779923, 672 | 1 673 | ] 674 | }, 675 | { 676 | "date" : 752313873.369439, 677 | "title" : "Untitled", 678 | "transform" : [ 679 | 0.99702495, 680 | -1.1394123e-08, 681 | -0.07707892, 682 | 0, 683 | -0.0073043588, 684 | 0.9954996, 685 | -0.09448386, 686 | 0, 687 | 0.07673198, 688 | 0.094765835, 689 | 0.992538, 690 | 0, 691 | 0.13004886, 692 | 0.16652949, 693 | 0.7673404, 694 | 1 695 | ] 696 | } 697 | ], 698 | "9901D49B-A0A7-408B-B62C-BA50B672ECCA" : [ 699 | { 700 | "date" : 752822191.653305, 701 | "title" : "Untitled", 702 | "transform" : [ 703 | 0.9280326, 704 | -4.8579385e-10, 705 | -0.37249908, 706 | 0, 707 | -0.028322618, 708 | 0.99710524, 709 | -0.07056209, 710 | 0, 711 | 0.3714208, 712 | 0.07603412, 713 | 0.92534614, 714 | 0, 715 | 1.1558541, 716 | 0.2341559, 717 | 2.351994, 718 | 1 719 | ] 720 | }, 721 | { 722 | "date" : 752822183.779941, 723 | "title" : "Untitled", 724 | "transform" : [ 725 | 0.19097193, 726 | 1.527155e-10, 727 | -0.98159546, 728 | 0, 729 | 0.0582024, 730 | 0.9982406, 731 | 0.011323428, 732 | 0, 733 | 0.9798684, 734 | -0.05929362, 735 | 0.19063595, 736 | 0, 737 | 3.0260022, 738 | -0.18349226, 739 | 0.0782184, 740 | 1 741 | ] 742 | }, 743 | { 744 | "date" : 752822129.416927, 745 | "title" : "Untitled", 746 | "transform" : [ 747 | 0.99978757, 748 | 1.407019e-10, 749 | 0.020609941, 750 | 0, 751 | 2.0676302e-05, 752 | 0.9999995, 753 | -0.001003018, 754 | 0, 755 | -0.020609934, 756 | 0.0010032856, 757 | 0.99978715, 758 | 0, 759 | -0.05330346, 760 | 0.0025947734, 761 | 2.5857494, 762 | 1 763 | ] 764 | } 765 | ], 766 | "ACAC4535-8279-450C-8A52-4EA9A007CD4E" : [ 767 | { 768 | "date" : 749312175.842336, 769 | "title" : "Untitled", 770 | "transform" : [ 771 | 0.85369796, 772 | -5.150211e-09, 773 | 0.5207683, 774 | 0, 775 | 0.051623367, 776 | 0.9950745, 777 | -0.08462643, 778 | 0, 779 | -0.5182032, 780 | 0.09912923, 781 | 0.84949315, 782 | 0, 783 | -0.39165217, 784 | 0.10139797, 785 | 0.3371244, 786 | 1 787 | ] 788 | }, 789 | { 790 | "date" : 749301445.418735, 791 | "title" : "Untitled", 792 | "transform" : [ 793 | 0.7363221, 794 | 1.7492405e-09, 795 | 0.67663115, 796 | 0, 797 | -0.038660366, 798 | 0.9983663, 799 | 0.042070903, 800 | 0, 801 | -0.6755257, 802 | -0.057136547, 803 | 0.7351192, 804 | 0, 805 | -0.4562881, 806 | 0.023531776, 807 | 0.261865, 808 | 1 809 | ] 810 | }, 811 | { 812 | "date" : 749301440.417032, 813 | "title" : "Untitled", 814 | "transform" : [ 815 | 0.7363221, 816 | 1.7492405e-09, 817 | 0.67663115, 818 | 0, 819 | -0.038660366, 820 | 0.9983663, 821 | 0.042070903, 822 | 0, 823 | -0.6755257, 824 | -0.057136547, 825 | 0.7351192, 826 | 0, 827 | -0.47954637, 828 | -0.041362025, 829 | 0.23544832, 830 | 1 831 | ] 832 | }, 833 | { 834 | "date" : 749301438.77042, 835 | "title" : "Untitled", 836 | "transform" : [ 837 | 0.7363221, 838 | 1.7492405e-09, 839 | 0.67663115, 840 | 0, 841 | -0.038660366, 842 | 0.9983663, 843 | 0.042070903, 844 | 0, 845 | -0.6755257, 846 | -0.057136547, 847 | 0.7351192, 848 | 0, 849 | -0.48364887, 850 | -0.041715875, 851 | 0.23746257, 852 | 1 853 | ] 854 | }, 855 | { 856 | "date" : 749301429.92811, 857 | "title" : "Untitled", 858 | "transform" : [ 859 | 0.7363221, 860 | 1.7492405e-09, 861 | 0.67663115, 862 | 0, 863 | -0.038660366, 864 | 0.9983663, 865 | 0.042070903, 866 | 0, 867 | -0.6755257, 868 | -0.057136547, 869 | 0.7351192, 870 | 0, 871 | -0.35626346, 872 | -0.008688533, 873 | 0.388548, 874 | 1 875 | ] 876 | }, 877 | { 878 | "date" : 749301426.394829, 879 | "title" : "Untitled", 880 | "transform" : [ 881 | 0.7363221, 882 | 1.7492405e-09, 883 | 0.67663115, 884 | 0, 885 | -0.038660366, 886 | 0.9983663, 887 | 0.042070903, 888 | 0, 889 | -0.6755257, 890 | -0.057136547, 891 | 0.7351192, 892 | 0, 893 | -0.35626346, 894 | -0.008688533, 895 | 0.388548, 896 | 1 897 | ] 898 | }, 899 | { 900 | "date" : 749301419.223626, 901 | "title" : "Untitled", 902 | "transform" : [ 903 | 0.9382678, 904 | -1.7557156e-10, 905 | 0.3459096, 906 | 0, 907 | -0.030112686, 908 | 0.99620366, 909 | 0.08167962, 910 | 0, 911 | -0.3445964, 912 | -0.08705362, 913 | 0.9347058, 914 | 0, 915 | -0.18161917, 916 | -0.024495376, 917 | 0.49435198, 918 | 1 919 | ] 920 | }, 921 | { 922 | "date" : 749301413.68389, 923 | "title" : "Untitled", 924 | "transform" : [ 925 | 0.915817, 926 | 9.652028e-12, 927 | 0.40159574, 928 | 0, 929 | 0.0051616775, 930 | 0.99991745, 931 | -0.011770922, 932 | 0, 933 | -0.4015626, 934 | 0.012852918, 935 | 0.91574144, 936 | 0, 937 | -0.0745155, 938 | 0.009969849, 939 | 0.17046376, 940 | 1 941 | ] 942 | }, 943 | { 944 | "date" : 749301400.718031, 945 | "title" : "Untitled", 946 | "transform" : [ 947 | 0.99926805, 948 | -7.666882e-12, 949 | 0.03825472, 950 | 0, 951 | 0.0012565067, 952 | 0.9994604, 953 | -0.032821756, 954 | 0, 955 | -0.038234074, 956 | 0.0328458, 957 | 0.9987288, 958 | 0, 959 | -0.02123958, 960 | 0.04216708, 961 | 0.5719801, 962 | 1 963 | ] 964 | }, 965 | { 966 | "date" : 749301396.795195, 967 | "title" : "Untitled", 968 | "transform" : [ 969 | 0.9997294, 970 | 1.3472855e-10, 971 | 0.023263175, 972 | 0, 973 | -0.00444252, 974 | 0.98159623, 975 | 0.19091623, 976 | 0, 977 | -0.022835044, 978 | -0.1909679, 979 | 0.9813306, 980 | 0, 981 | -0.012539994, 982 | -0.08659607, 983 | 0.5672169, 984 | 1 985 | ] 986 | } 987 | ], 988 | "C4AAC052-461E-4693-8E7F-C838612D1520" : [ 989 | { 990 | "date" : 753524259.641493, 991 | "title" : "Untitled", 992 | "transform" : [ 993 | 0.9789929, 994 | -2.985289e-10, 995 | -0.2038943, 996 | 0, 997 | -0.004697596, 998 | 0.9997346, 999 | -0.02255538, 1000 | 0, 1001 | 0.20384018, 1002 | 0.023039369, 1003 | 0.978733, 1004 | 0, 1005 | 0.29548895, 1006 | -0.06367762, 1007 | 1.1552727, 1008 | 1 1009 | ] 1010 | }, 1011 | { 1012 | "date" : 753524238.850955, 1013 | "title" : "Untitled", 1014 | "transform" : [ 1015 | 0.9809831, 1016 | -4.8508797e-10, 1017 | -0.19409342, 1018 | 0, 1019 | 0.0052317907, 1020 | 0.99963665, 1021 | 0.02644241, 1022 | 0, 1023 | 0.1940229, 1024 | -0.026955014, 1025 | 0.98062664, 1026 | 0, 1027 | 0.28301167, 1028 | -0.123136826, 1029 | 1.1535884, 1030 | 1 1031 | ] 1032 | }, 1033 | { 1034 | "date" : 753524234.928313, 1035 | "title" : "Untitled", 1036 | "transform" : [ 1037 | 0.9809831, 1038 | -4.8508797e-10, 1039 | -0.19409342, 1040 | 0, 1041 | 0.0052317907, 1042 | 0.99963665, 1043 | 0.02644241, 1044 | 0, 1045 | 0.1940229, 1046 | -0.026955014, 1047 | 0.98062664, 1048 | 0, 1049 | 0.28910345, 1050 | -0.12578732, 1051 | 1.1784191, 1052 | 1 1053 | ] 1054 | }, 1055 | { 1056 | "date" : 753524233.365221, 1057 | "title" : "Untitled", 1058 | "transform" : [ 1059 | 0.9809831, 1060 | -4.8508797e-10, 1061 | -0.19409342, 1062 | 0, 1063 | 0.0052317907, 1064 | 0.99963665, 1065 | 0.02644241, 1066 | 0, 1067 | 0.1940229, 1068 | -0.026955014, 1069 | 0.98062664, 1070 | 0, 1071 | 0.31304416, 1072 | -0.1362038, 1073 | 1.2760042, 1074 | 1 1075 | ] 1076 | }, 1077 | { 1078 | "date" : 753524221.589664, 1079 | "title" : "Untitled", 1080 | "transform" : [ 1081 | 0.80823237, 1082 | 1.3271535e-09, 1083 | 0.5888637, 1084 | 0, 1085 | 0.025333703, 1086 | 0.9990741, 1087 | -0.034771238, 1088 | 0, 1089 | -0.5883185, 1090 | 0.04302134, 1091 | 0.80748403, 1092 | 0, 1093 | -0.64332336, 1094 | -0.038955666, 1095 | 0.9719767, 1096 | 1 1097 | ] 1098 | }, 1099 | { 1100 | "date" : 753524217.139689, 1101 | "title" : "Untitled", 1102 | "transform" : [ 1103 | 0.80823237, 1104 | 1.3271535e-09, 1105 | 0.5888637, 1106 | 0, 1107 | 0.025333703, 1108 | 0.9990741, 1109 | -0.034771238, 1110 | 0, 1111 | -0.5883185, 1112 | 0.04302134, 1113 | 0.80748403, 1114 | 0, 1115 | 0.41508114, 1116 | -0.053941775, 1117 | 1.7439102, 1118 | 1 1119 | ] 1120 | }, 1121 | { 1122 | "date" : 753524213.003321, 1123 | "title" : "Untitled", 1124 | "transform" : [ 1125 | 0.9903953, 1126 | 3.0464942e-10, 1127 | -0.13826479, 1128 | 0, 1129 | 0.0033005562, 1130 | 0.999715, 1131 | 0.023641994, 1132 | 0, 1133 | 0.13822539, 1134 | -0.023871271, 1135 | 0.990113, 1136 | 0, 1137 | 1.5095494, 1138 | -0.13171485, 1139 | 0.95934176, 1140 | 1 1141 | ] 1142 | }, 1143 | { 1144 | "date" : 753524208.73831, 1145 | "title" : "Untitled", 1146 | "transform" : [ 1147 | 0.9903953, 1148 | 3.0464942e-10, 1149 | -0.13826479, 1150 | 0, 1151 | 0.0033005562, 1152 | 0.999715, 1153 | 0.023641994, 1154 | 0, 1155 | 0.13822539, 1156 | -0.023871271, 1157 | 0.990113, 1158 | 0, 1159 | 0.28157437, 1160 | -0.09672483, 1161 | 1.1316158, 1162 | 1 1163 | ] 1164 | }, 1165 | { 1166 | "date" : 753524184.327003, 1167 | "title" : "Untitled", 1168 | "transform" : [ 1169 | 0.9903953, 1170 | 3.0464942e-10, 1171 | -0.13826479, 1172 | 0, 1173 | 0.0033005562, 1174 | 0.999715, 1175 | 0.023641994, 1176 | 0, 1177 | 0.13822539, 1178 | -0.023871271, 1179 | 0.990113, 1180 | 0, 1181 | 0.28157437, 1182 | -0.09672483, 1183 | 1.1316158, 1184 | 1 1185 | ] 1186 | }, 1187 | { 1188 | "date" : 753524180.659211, 1189 | "title" : "Untitled", 1190 | "transform" : [ 1191 | 0.9889634, 1192 | -3.6183767e-10, 1193 | -0.14815974, 1194 | 0, 1195 | 0.0020554154, 1196 | 0.99990374, 1197 | 0.013719857, 1198 | 0, 1199 | 0.14814548, 1200 | -0.013872968, 1201 | 0.9888683, 1202 | 0, 1203 | 0.29299867, 1204 | -0.085141614, 1205 | 1.1296452, 1206 | 1 1207 | ] 1208 | } 1209 | ], 1210 | "D6A5D356-228B-49B1-8379-DC92AA5AA057" : [ 1211 | { 1212 | "date" : 753528523.256758, 1213 | "title" : "Untitled", 1214 | "transform" : [ 1215 | 0.96374243, 1216 | -1.1545466e-09, 1217 | -0.26683465, 1218 | 0, 1219 | -0.001110416, 1220 | 0.99999136, 1221 | -0.004010542, 1222 | 0, 1223 | 0.2668324, 1224 | 0.004161423, 1225 | 0.96373403, 1226 | 0, 1227 | 0.31693658, 1228 | -0.110744834, 1229 | 1.3918251, 1230 | 1 1231 | ] 1232 | }, 1233 | { 1234 | "date" : 753528478.731942, 1235 | "title" : "Untitled", 1236 | "transform" : [ 1237 | 0.92713, 1238 | -1.26969e-09, 1239 | -0.37473997, 1240 | 0, 1241 | -0.017357407, 1242 | 0.9989267, 1243 | -0.0429433, 1244 | 0, 1245 | 0.3743378, 1246 | 0.04631853, 1247 | 0.92613494, 1248 | 0, 1249 | 0.47700253, 1250 | -0.047302812, 1251 | 1.3301779, 1252 | 1 1253 | ] 1254 | }, 1255 | { 1256 | "date" : 753528476.749353, 1257 | "title" : "Untitled", 1258 | "transform" : [ 1259 | 0.91483617, 1260 | 1.0864376e-09, 1261 | -0.40382528, 1262 | 0, 1263 | -0.029058188, 1264 | 0.99740773, 1265 | -0.06582915, 1266 | 0, 1267 | 0.40277845, 1268 | 0.07195732, 1269 | 0.9124647, 1270 | 0, 1271 | 0.516841, 1272 | -0.009041935, 1273 | 1.3036176, 1274 | 1 1275 | ] 1276 | }, 1277 | { 1278 | "date" : 753528462.843478, 1279 | "title" : "Untitled", 1280 | "transform" : [ 1281 | 0.96982855, 1282 | -3.6833117e-10, 1283 | -0.24378797, 1284 | 0, 1285 | 0.00030016503, 1286 | 0.9999992, 1287 | 0.0011941176, 1288 | 0, 1289 | 0.24378781, 1290 | -0.0012312664, 1291 | 0.96982783, 1292 | 0, 1293 | 0.28201634, 1294 | -0.11890778, 1295 | 1.400907, 1296 | 1 1297 | ] 1298 | }, 1299 | { 1300 | "date" : 753528414.874265, 1301 | "title" : "Untitled", 1302 | "transform" : [ 1303 | 0.99945843, 1304 | -3.4085318e-10, 1305 | -0.03290671, 1306 | 0, 1307 | -0.00041676484, 1308 | 0.9999199, 1309 | -0.012658109, 1310 | 0, 1311 | 0.032904074, 1312 | 0.012664964, 1313 | 0.9993782, 1314 | 0, 1315 | -0.040245254, 1316 | -0.09789485, 1317 | 1.4215512, 1318 | 1 1319 | ] 1320 | }, 1321 | { 1322 | "date" : 753528405.039284, 1323 | "title" : "Untitled", 1324 | "transform" : [ 1325 | 0.99679166, 1326 | -3.189913e-10, 1327 | -0.08004028, 1328 | 0, 1329 | 0.00021752386, 1330 | 0.99999636, 1331 | 0.0027089906, 1332 | 0, 1333 | 0.080039985, 1334 | -0.0027177124, 1335 | 0.9967879, 1336 | 0, 1337 | 0.031605095, 1338 | -0.12115973, 1339 | 1.427561, 1340 | 1 1341 | ] 1342 | }, 1343 | { 1344 | "date" : 753528395.557959, 1345 | "title" : "Untitled", 1346 | "transform" : [ 1347 | 0.99679166, 1348 | -3.189913e-10, 1349 | -0.08004028, 1350 | 0, 1351 | 0.00021752386, 1352 | 0.99999636, 1353 | 0.0027089906, 1354 | 0, 1355 | 0.080039985, 1356 | -0.0027177124, 1357 | 0.9967879, 1358 | 0, 1359 | 0.031605095, 1360 | -0.12115973, 1361 | 1.427561, 1362 | 1 1363 | ] 1364 | }, 1365 | { 1366 | "date" : 753528377.940167, 1367 | "title" : "Untitled", 1368 | "transform" : [ 1369 | 0.9954941, 1370 | -4.0250225e-10, 1371 | -0.09482399, 1372 | 0, 1373 | -0.0015975317, 1374 | 0.9998582, 1375 | -0.016771398, 1376 | 0, 1377 | 0.09481053, 1378 | 0.016847307, 1379 | 0.99535275, 1380 | 0, 1381 | 0.053415813, 1382 | -0.09158465, 1383 | 1.4195024, 1384 | 1 1385 | ] 1386 | }, 1387 | { 1388 | "date" : 753528372.98528, 1389 | "title" : "Untitled", 1390 | "transform" : [ 1391 | 0.84918284, 1392 | -4.0267878e-10, 1393 | -0.52809906, 1394 | 0, 1395 | -0.0052097486, 1396 | 0.9999514, 1397 | -0.008377267, 1398 | 0, 1399 | 0.5280733, 1400 | 0.009865089, 1401 | 0.8491414, 1402 | 0, 1403 | 0.7213083, 1404 | -0.1021229, 1405 | 1.2401906, 1406 | 1 1407 | ] 1408 | }, 1409 | { 1410 | "date" : 753528369.98708, 1411 | "title" : "Untitled", 1412 | "transform" : [ 1413 | 0.29518446, 1414 | 1.7265294e-09, 1415 | -0.95544034, 1416 | 0, 1417 | 0.06895637, 1418 | 0.99739224, 1419 | 0.021304157, 1420 | 0, 1421 | 0.95294863, 1422 | -0.07217234, 1423 | 0.29441464, 1424 | 0, 1425 | 1.441986, 1426 | -0.22729588, 1427 | 0.4496357, 1428 | 1 1429 | ] 1430 | } 1431 | ], 1432 | "FBFFEBEA-B32F-4413-BAA0-6DC996551A82" : [ 1433 | { 1434 | "date" : 752319599.196014, 1435 | "title" : "Untitled", 1436 | "transform" : [ 1437 | 0.92085, 1438 | 3.9366173e-09, 1439 | 0.3899169, 1440 | 0, 1441 | -0.057226017, 1442 | 0.9891714, 1443 | 0.13514824, 1444 | 0, 1445 | -0.38569468, 1446 | -0.14676465, 1447 | 0.9108786, 1448 | 0, 1449 | -0.4276484, 1450 | -0.12914853, 1451 | 0.62554467, 1452 | 1 1453 | ] 1454 | }, 1455 | { 1456 | "date" : 752319588.773561, 1457 | "title" : "Untitled", 1458 | "transform" : [ 1459 | 0.92085, 1460 | 3.9366173e-09, 1461 | 0.3899169, 1462 | 0, 1463 | -0.057226017, 1464 | 0.9891714, 1465 | 0.13514824, 1466 | 0, 1467 | -0.38569468, 1468 | -0.14676465, 1469 | 0.9108786, 1470 | 0, 1471 | -0.31030244, 1472 | -0.11807637, 1473 | 0.73282796, 1474 | 1 1475 | ] 1476 | }, 1477 | { 1478 | "date" : 752319536.132355, 1479 | "title" : "Untitled", 1480 | "transform" : [ 1481 | 0.92085, 1482 | 3.9366173e-09, 1483 | 0.3899169, 1484 | 0, 1485 | -0.057226017, 1486 | 0.9891714, 1487 | 0.13514824, 1488 | 0, 1489 | -0.38569462, 1490 | -0.14676464, 1491 | 0.9108785, 1492 | 0, 1493 | -0.39570516, 1494 | -0.15057385, 1495 | 0.9345199, 1496 | 1 1497 | ] 1498 | }, 1499 | { 1500 | "date" : 752319515.747737, 1501 | "title" : "Untitled", 1502 | "transform" : [ 1503 | 0.9206638, 1504 | 3.0996352e-09, 1505 | 0.39035648, 1506 | 0, 1507 | -0.073215835, 1508 | 0.9822529, 1509 | 0.17268103, 1510 | 0, 1511 | -0.38342878, 1512 | -0.18756142, 1513 | 0.90432453, 1514 | 0, 1515 | -0.3933805, 1516 | -0.1924295, 1517 | 0.92779595, 1518 | 1 1519 | ] 1520 | }, 1521 | { 1522 | "date" : 752319497.332319, 1523 | "title" : "Untitled", 1524 | "transform" : [ 1525 | 0.9348175, 1526 | 3.3756171e-09, 1527 | 0.35512844, 1528 | 0, 1529 | -0.06202225, 1530 | 0.98463094, 1531 | 0.16326343, 1532 | 0, 1533 | -0.3496705, 1534 | -0.17464736, 1535 | 0.92045027, 1536 | 0, 1537 | -0.35874602, 1538 | -0.17918026, 1539 | 0.94434017, 1540 | 1 1541 | ] 1542 | }, 1543 | { 1544 | "date" : 752319491.505512, 1545 | "title" : "Untitled", 1546 | "transform" : [ 1547 | 0.97459346, 1548 | 3.0124214e-09, 1549 | 0.22398108, 1550 | 0, 1551 | -0.049122695, 1552 | 0.97565377, 1553 | 0.21374424, 1554 | 0, 1555 | -0.21852802, 1556 | -0.21931627, 1557 | 0.9508658, 1558 | 0, 1559 | -0.22419976, 1560 | -0.22500855, 1561 | 0.9755451, 1562 | 1 1563 | ] 1564 | }, 1565 | { 1566 | "date" : 752319483.473321, 1567 | "title" : "Untitled", 1568 | "transform" : [ 1569 | 0.9218652, 1570 | 2.734346e-09, 1571 | 0.38751063, 1572 | 0, 1573 | -0.07033138, 1574 | 0.9833919, 1575 | 0.16731426, 1576 | 0, 1577 | -0.3810748, 1578 | -0.18149531, 1579 | 0.9065547, 1580 | 0, 1581 | -0.39096537, 1582 | -0.18620594, 1583 | 0.93008393, 1584 | 1 1585 | ] 1586 | }, 1587 | { 1588 | "date" : 752319479.986701, 1589 | "title" : "Untitled", 1590 | "transform" : [ 1591 | 0.9518773, 1592 | 4.336469e-09, 1593 | 0.30647948, 1594 | 0, 1595 | -0.021309476, 1596 | 0.99757993, 1597 | 0.066183865, 1598 | 0, 1599 | -0.30573776, 1600 | -0.06952985, 1601 | 0.9495737, 1602 | 0, 1603 | -0.31367308, 1604 | -0.07133446, 1605 | 0.9742194, 1606 | 1 1607 | ] 1608 | }, 1609 | { 1610 | "date" : 752319478.388345, 1611 | "title" : "Untitled", 1612 | "transform" : [ 1613 | 0.9665297, 1614 | -1.7726731e-09, 1615 | 0.25655457, 1616 | 0, 1617 | 0.026015135, 1618 | 0.99484557, 1619 | -0.09800803, 1620 | 0, 1621 | -0.25523216, 1622 | 0.10140198, 1623 | 0.9615478, 1624 | 0, 1625 | -0.2618566, 1626 | 0.10403383, 1627 | 0.9865043, 1628 | 1 1629 | ] 1630 | }, 1631 | { 1632 | "date" : 752319459.355076, 1633 | "title" : "Untitled", 1634 | "transform" : [ 1635 | 0.99602497, 1636 | -1.1017036e-09, 1637 | 0.08907449, 1638 | 0, 1639 | 0.017584177, 1640 | 0.9803211, 1641 | -0.19662508, 1642 | 0, 1643 | -0.08732161, 1644 | 0.1974098, 1645 | 0.9764243, 1646 | 0, 1647 | -0.22583985, 1648 | 0.510561, 1649 | 2.525326, 1650 | 1 1651 | ] 1652 | } 1653 | ] 1654 | }, 1655 | "sceneViewportBackgroundColors" : { 1656 | 1657 | }, 1658 | "selectedSceneRelativePath" : "Ex06.usda" 1659 | } -------------------------------------------------------------------------------- /Packages/RealityKitContent/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:6.0 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "RealityKitContent", 8 | platforms: [ 9 | .visionOS(.v2), 10 | .macOS(.v15), 11 | .iOS(.v18) 12 | ], 13 | products: [ 14 | // Products define the executables and libraries a package produces, and make them visible to other packages. 15 | .library( 16 | name: "RealityKitContent", 17 | targets: ["RealityKitContent"]), 18 | ], 19 | dependencies: [ 20 | // Dependencies declare other packages that this package depends on. 21 | // .package(url: /* package url */, from: "1.0.0"), 22 | ], 23 | targets: [ 24 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 25 | // Targets can depend on other targets in this package, and on products in packages this package depends on. 26 | .target( 27 | name: "RealityKitContent", 28 | dependencies: []), 29 | ] 30 | ) -------------------------------------------------------------------------------- /Packages/RealityKitContent/README.md: -------------------------------------------------------------------------------- 1 | # RealityKitContent 2 | 3 | A description of this package. -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Ex01.usda: -------------------------------------------------------------------------------- 1 | #usda 1.0 2 | ( 3 | customLayerData = { 4 | string creator = "Reality Composer Pro Version 2.0 (448.0.16.0.3)" 5 | } 6 | defaultPrim = "Root" 7 | metersPerUnit = 1 8 | upAxis = "Y" 9 | ) 10 | 11 | def Xform "Root" 12 | { 13 | reorder nameChildren = ["plane1mx0_5m", "InteriorMapping"] 14 | def Material "InteriorMapping" 15 | { 16 | token outputs:mtlx:surface.connect = 17 | token outputs:realitykit:vertex 18 | float2 ui:nodegraph:realitykit:subgraphOutputs:pos = (1369.4963, 136.18607) 19 | int ui:nodegraph:realitykit:subgraphOutputs:stackingOrder = 2152 20 | 21 | def Shader "UnlitSurface" 22 | { 23 | uniform token info:id = "ND_realitykit_unlit_surfaceshader" 24 | bool inputs:applyPostProcessToneMap 25 | color3f inputs:color = (0.7575306, 0.7575306, 0.7575306) ( 26 | colorSpace = "srgb_texture" 27 | ) 28 | color3f inputs:color.connect = 29 | bool inputs:hasPremultipliedAlpha 30 | float inputs:opacity 31 | float inputs:opacityThreshold 32 | token outputs:out 33 | float2 ui:nodegraph:node:pos = (1123.7223, 97.750275) 34 | int ui:nodegraph:node:stackingOrder = 2152 35 | string[] ui:nodegraph:realitykit:node:attributesShowingChildren = ["inputs:color"] 36 | } 37 | 38 | def Shader "TextureCoordinates" 39 | { 40 | uniform token info:id = "ND_texcoord_vector2" 41 | float2 outputs:out 42 | float2 ui:nodegraph:node:pos = (-696.7738, 26.444374) 43 | int ui:nodegraph:node:stackingOrder = 2669 44 | } 45 | 46 | def Shader "Separate2" 47 | { 48 | uniform token info:id = "ND_separate2_vector2" 49 | float2 inputs:in.connect = 50 | float outputs:outx 51 | float outputs:outy 52 | float2 ui:nodegraph:node:pos = (-501.88318, 23.315468) 53 | int ui:nodegraph:node:stackingOrder = 2669 54 | } 55 | 56 | def Shader "Separate3_2" 57 | { 58 | uniform token info:id = "ND_separate3_vector3" 59 | float3 inputs:in.connect = 60 | float outputs:outx 61 | float outputs:outy 62 | float outputs:outz 63 | float2 ui:nodegraph:node:pos = (-432.75513, 205.24368) 64 | int ui:nodegraph:node:stackingOrder = 2669 65 | } 66 | 67 | def Shader "Multiply" 68 | { 69 | uniform token info:id = "ND_multiply_float" 70 | float inputs:in1.connect = 71 | float inputs:in2.connect = 72 | float outputs:out 73 | float2 ui:nodegraph:node:pos = (-123.6077, 8.25103) 74 | int ui:nodegraph:node:stackingOrder = 2669 75 | } 76 | 77 | def Shader "Multiply_1" 78 | { 79 | uniform token info:id = "ND_multiply_float" 80 | float inputs:in1.connect = 81 | float inputs:in2.connect = 82 | float outputs:out 83 | float2 ui:nodegraph:node:pos = (-273.1574, 63.37955) 84 | int ui:nodegraph:node:stackingOrder = 2669 85 | } 86 | 87 | def Shader "ViewDirection" 88 | { 89 | uniform token info:id = "ND_realitykit_viewdirection_vector3" 90 | string inputs:space = "model" 91 | float3 outputs:out 92 | float2 ui:nodegraph:node:pos = (-937.7185, 547.37836) 93 | int ui:nodegraph:node:stackingOrder = 2669 94 | } 95 | 96 | def Shader "Multiply_2" 97 | { 98 | uniform token info:id = "ND_multiply_vector3FA" 99 | float3 inputs:in1.connect = 100 | float inputs:in2 = -1 101 | float3 outputs:out 102 | float2 ui:nodegraph:node:pos = (-588.96265, 547.6769) 103 | int ui:nodegraph:node:stackingOrder = 2669 104 | } 105 | 106 | def Shader "Normalize" 107 | { 108 | uniform token info:id = "ND_normalize_vector3" 109 | float3 inputs:in.connect = 110 | float3 outputs:out 111 | float2 ui:nodegraph:node:pos = (-711.40015, 523.43085) 112 | int ui:nodegraph:node:stackingOrder = 2669 113 | } 114 | 115 | def Shader "Subtract" 116 | { 117 | uniform token info:id = "ND_subtract_float" 118 | float inputs:in1.connect = 119 | float inputs:in2.connect = 120 | float outputs:out 121 | float2 ui:nodegraph:node:pos = (180.54381, 35.725353) 122 | int ui:nodegraph:node:stackingOrder = 2669 123 | } 124 | 125 | def Shader "Divide" 126 | { 127 | uniform token info:id = "ND_divide_float" 128 | float inputs:in1.connect = 129 | float inputs:in2.connect = 130 | float outputs:out 131 | float2 ui:nodegraph:node:pos = (338.52658, 182.89029) 132 | int ui:nodegraph:node:stackingOrder = 2669 133 | } 134 | 135 | def Shader "Separate3" 136 | { 137 | uniform token info:id = "ND_separate3_vector3" 138 | float3 inputs:in.connect = 139 | float outputs:outx 140 | float outputs:outy 141 | float outputs:outz 142 | float2 ui:nodegraph:node:pos = (-461.50836, 538.85284) 143 | int ui:nodegraph:node:stackingOrder = 2669 144 | } 145 | 146 | def Shader "Step" 147 | { 148 | uniform token info:id = "ND_realitykit_step_float" 149 | float inputs:edge 150 | float inputs:in.connect = 151 | float outputs:out 152 | float2 ui:nodegraph:node:pos = (-66.59325, 112.98172) 153 | int ui:nodegraph:node:stackingOrder = 2669 154 | } 155 | 156 | def Shader "Multiply_3" 157 | { 158 | uniform token info:id = "ND_multiply_float" 159 | float inputs:in1.connect = 160 | float inputs:in2.connect = 161 | float outputs:out 162 | float2 ui:nodegraph:node:pos = (75.69891, 71.39337) 163 | int ui:nodegraph:node:stackingOrder = 2669 164 | } 165 | 166 | def Shader "Step_1" 167 | { 168 | uniform token info:id = "ND_realitykit_step_float" 169 | float inputs:edge 170 | float inputs:in.connect = 171 | float outputs:out 172 | float2 ui:nodegraph:node:pos = (-52.08176, 314.32748) 173 | int ui:nodegraph:node:stackingOrder = 2669 174 | } 175 | 176 | def Shader "Multiply_4" 177 | { 178 | uniform token info:id = "ND_multiply_float" 179 | float inputs:in1.connect = 180 | float inputs:in2.connect = 181 | float outputs:out 182 | float2 ui:nodegraph:node:pos = (128.24931, 347.01712) 183 | int ui:nodegraph:node:stackingOrder = 2669 184 | } 185 | 186 | def Shader "Subtract_1" 187 | { 188 | uniform token info:id = "ND_subtract_float" 189 | float inputs:in1.connect = 190 | float inputs:in2.connect = 191 | float outputs:out 192 | float2 ui:nodegraph:node:pos = (235.12863, 306.1284) 193 | int ui:nodegraph:node:stackingOrder = 2669 194 | } 195 | 196 | def Shader "Divide_1" 197 | { 198 | uniform token info:id = "ND_divide_float" 199 | float inputs:in1.connect = 200 | float inputs:in2.connect = 201 | float outputs:out 202 | float2 ui:nodegraph:node:pos = (338.0587, 359.89478) 203 | int ui:nodegraph:node:stackingOrder = 2669 204 | } 205 | 206 | def Shader "Min" 207 | { 208 | uniform token info:id = "ND_min_float" 209 | float inputs:in1.connect = 210 | float inputs:in2.connect = 211 | float outputs:out 212 | float2 ui:nodegraph:node:pos = (460.8791, 265.1225) 213 | int ui:nodegraph:node:stackingOrder = 2669 214 | } 215 | 216 | def Shader "Step_2" 217 | { 218 | uniform token info:id = "ND_realitykit_step_float" 219 | float inputs:edge 220 | float inputs:in.connect = 221 | float outputs:out 222 | float2 ui:nodegraph:node:pos = (107.66125, 691.14307) 223 | int ui:nodegraph:node:stackingOrder = 2669 224 | } 225 | 226 | def Shader "Multiply_5" 227 | { 228 | uniform token info:id = "ND_multiply_float" 229 | float inputs:in1.connect = 230 | float inputs:in2.connect = 231 | float outputs:out 232 | float2 ui:nodegraph:node:pos = (253.12386, 620.2819) 233 | int ui:nodegraph:node:stackingOrder = 2669 234 | } 235 | 236 | def Shader "Divide_2" 237 | { 238 | uniform token info:id = "ND_divide_float" 239 | float inputs:in1.connect = 240 | float inputs:in2.connect = 241 | float outputs:out 242 | float2 ui:nodegraph:node:pos = (450.96887, 502.21603) 243 | int ui:nodegraph:node:stackingOrder = 2669 244 | } 245 | 246 | def Shader "Min_1" 247 | { 248 | uniform token info:id = "ND_min_float" 249 | float inputs:in1.connect = 250 | float inputs:in2.connect = 251 | float outputs:out 252 | float2 ui:nodegraph:node:pos = (643.03485, 385.7345) 253 | int ui:nodegraph:node:stackingOrder = 2669 254 | } 255 | 256 | def Shader "Multiply_6" 257 | { 258 | uniform token info:id = "ND_multiply_float" 259 | float inputs:in1.connect = 260 | float inputs:in2 = -1 261 | float outputs:out 262 | float2 ui:nodegraph:node:pos = (-125.190735, 646.71545) 263 | int ui:nodegraph:node:stackingOrder = 2669 264 | } 265 | 266 | def Shader "RoomSize" 267 | { 268 | uniform token info:id = "ND_constant_vector3" 269 | float3 inputs:value = (1, 0.5, 0.75) 270 | float3 outputs:out 271 | float2 ui:nodegraph:node:pos = (-699.93994, 241.63158) 272 | int ui:nodegraph:node:stackingOrder = 2669 273 | } 274 | 275 | def Shader "Combine3" 276 | { 277 | uniform token info:id = "ND_combine3_color3" 278 | float inputs:in1.connect = 279 | float inputs:in2.connect = 280 | float inputs:in3.connect = 281 | color3f outputs:out 282 | float2 ui:nodegraph:node:pos = (133.67384, 844.69617) 283 | int ui:nodegraph:node:stackingOrder = 2669 284 | } 285 | 286 | def Shader "Multiply_7" 287 | { 288 | uniform token info:id = "ND_multiply_color3FA" 289 | prepend color3f inputs:in1.connect = 290 | float inputs:in2.connect = 291 | color3f outputs:out 292 | float2 ui:nodegraph:node:pos = (270.2805, 833.6323) 293 | int ui:nodegraph:node:stackingOrder = 2669 294 | } 295 | 296 | def Shader "Combine3_2" 297 | { 298 | uniform token info:id = "ND_combine3_color3" 299 | float inputs:in1.connect = 300 | float inputs:in2.connect = 301 | float inputs:in3 302 | color3f outputs:out 303 | float2 ui:nodegraph:node:pos = (599.962, 737.6733) 304 | int ui:nodegraph:node:stackingOrder = 2669 305 | } 306 | 307 | def Shader "Add" 308 | { 309 | uniform token info:id = "ND_add_color3" 310 | color3f inputs:in1.connect = 311 | color3f inputs:in2.connect = 312 | color3f outputs:out 313 | float2 ui:nodegraph:node:pos = (779.4173, 817.3374) 314 | int ui:nodegraph:node:stackingOrder = 2669 315 | } 316 | 317 | def Shader "Divide_4" 318 | { 319 | uniform token info:id = "ND_divide_vector3" 320 | float3 inputs:in1.connect = 321 | float3 inputs:in2.connect = 322 | float3 outputs:out 323 | float2 ui:nodegraph:node:pos = (798.3482, 626.6473) 324 | int ui:nodegraph:node:stackingOrder = 2669 325 | } 326 | 327 | def Shader "Convert" 328 | { 329 | uniform token info:id = "ND_convert_color3_vector3" 330 | color3f inputs:in.connect = 331 | float3 outputs:out 332 | float2 ui:nodegraph:node:pos = (670.32513, 660.601) 333 | int ui:nodegraph:node:stackingOrder = 2669 334 | } 335 | 336 | def Shader "Subtract_2" 337 | { 338 | uniform token info:id = "ND_subtract_vector3FA" 339 | prepend float3 inputs:in1.connect = 340 | float inputs:in2 = 0.5 341 | float3 outputs:out 342 | float2 ui:nodegraph:node:pos = (935.6039, 638.53827) 343 | int ui:nodegraph:node:stackingOrder = 2669 344 | } 345 | 346 | def Shader "Abs" 347 | { 348 | uniform token info:id = "ND_absval_vector3" 349 | float3 inputs:in.connect = 350 | float3 outputs:out 351 | float2 ui:nodegraph:node:pos = (870.98773, 492.5614) 352 | int ui:nodegraph:node:stackingOrder = 2726 353 | } 354 | 355 | def Shader "Multiply_8" 356 | { 357 | uniform token info:id = "ND_multiply_vector3FA" 358 | prepend float3 inputs:in1.connect = 359 | float inputs:in2 = 2 360 | float3 outputs:out 361 | float2 ui:nodegraph:node:pos = (1089.5402, 428.6192) 362 | int ui:nodegraph:node:stackingOrder = 2777 363 | } 364 | 365 | def Shader "Step_3" 366 | { 367 | uniform token info:id = "ND_realitykit_step_vector3" 368 | float3 inputs:edge = (0.999, 0.999, 0.999) 369 | float3 inputs:in.connect = 370 | float3 outputs:out 371 | float2 ui:nodegraph:node:pos = (1260.7761, 423.25818) 372 | int ui:nodegraph:node:stackingOrder = 2777 373 | } 374 | 375 | def Shader "Convert_1" 376 | { 377 | uniform token info:id = "ND_convert_vector3_color3" 378 | float3 inputs:in.connect = 379 | color3f outputs:out 380 | float2 ui:nodegraph:node:pos = (893.1819, 85.56747) 381 | int ui:nodegraph:node:stackingOrder = 2152 382 | } 383 | 384 | def Shader "Separate3_1" 385 | { 386 | uniform token info:id = "ND_separate3_vector3" 387 | float3 inputs:in.connect = 388 | float outputs:outx 389 | float outputs:outy 390 | float outputs:outz 391 | float2 ui:nodegraph:node:pos = (931.9314, 768.4219) 392 | int ui:nodegraph:node:stackingOrder = 2164 393 | } 394 | 395 | def Shader "Separate3_3" 396 | { 397 | uniform token info:id = "ND_separate3_vector3" 398 | float3 inputs:in.connect = 399 | float outputs:outx 400 | float outputs:outy 401 | float outputs:outz 402 | float2 ui:nodegraph:node:pos = (933.5045, 858.9355) 403 | int ui:nodegraph:node:stackingOrder = 2162 404 | } 405 | 406 | def Shader "Combine2" 407 | { 408 | uniform token info:id = "ND_combine2_vector2" 409 | float inputs:in1.connect = 410 | float inputs:in2.connect = 411 | float2 outputs:out 412 | float2 ui:nodegraph:node:pos = (1188.6306, 838.24976) 413 | int ui:nodegraph:node:stackingOrder = 2168 414 | } 415 | 416 | def Shader "Multiply_10" 417 | { 418 | uniform token info:id = "ND_multiply_vector2FA" 419 | float2 inputs:in1.connect = 420 | float inputs:in2.connect = 421 | float2 outputs:out 422 | float2 ui:nodegraph:node:pos = (1577.9447, 804.86926) 423 | int ui:nodegraph:node:stackingOrder = 2306 424 | } 425 | 426 | def Shader "Combine2_1" 427 | { 428 | uniform token info:id = "ND_combine2_vector2" 429 | float inputs:in1.connect = 430 | float inputs:in2.connect = 431 | float2 outputs:out 432 | float2 ui:nodegraph:node:pos = (1200.279, 915.3217) 433 | int ui:nodegraph:node:stackingOrder = 2176 434 | } 435 | 436 | def Shader "Multiply_9" 437 | { 438 | uniform token info:id = "ND_multiply_vector2FA" 439 | float2 inputs:in1.connect = 440 | float inputs:in2.connect = 441 | float2 outputs:out 442 | float2 ui:nodegraph:node:pos = (1619.8699, 869.8323) 443 | int ui:nodegraph:node:stackingOrder = 2336 444 | } 445 | 446 | def Shader "Combine2_2" 447 | { 448 | uniform token info:id = "ND_combine2_vector2" 449 | float inputs:in1.connect = 450 | float inputs:in2.connect = 451 | float2 outputs:out 452 | float2 ui:nodegraph:node:pos = (1203.8971, 982.82153) 453 | int ui:nodegraph:node:stackingOrder = 2182 454 | } 455 | 456 | def Shader "Multiply_11" 457 | { 458 | uniform token info:id = "ND_multiply_vector2FA" 459 | float2 inputs:in1.connect = 460 | float inputs:in2.connect = 461 | float2 outputs:out 462 | float2 ui:nodegraph:node:pos = (1574.0513, 941.8903) 463 | int ui:nodegraph:node:stackingOrder = 2306 464 | } 465 | 466 | def Shader "Add_1" 467 | { 468 | uniform token info:id = "ND_add_vector2" 469 | float2 inputs:in1.connect = 470 | float2 inputs:in2.connect = 471 | float2 outputs:out 472 | float2 ui:nodegraph:node:pos = (1735.1558, 821.292) 473 | int ui:nodegraph:node:stackingOrder = 2306 474 | } 475 | 476 | def Shader "Add_2" 477 | { 478 | uniform token info:id = "ND_add_vector2" 479 | float2 inputs:in1.connect = 480 | float2 inputs:in2.connect = 481 | float2 outputs:out 482 | float2 ui:nodegraph:node:pos = (1842.8236, 880.5962) 483 | int ui:nodegraph:node:stackingOrder = 2306 484 | } 485 | 486 | def Shader "Image" 487 | { 488 | uniform token info:id = "ND_image_color3" 489 | color3f inputs:default 490 | asset inputs:file = @Textures/roomtexture2.png@ 491 | string inputs:filtertype 492 | float2 inputs:texcoord.connect = 493 | string inputs:uaddressmode 494 | string inputs:vaddressmode 495 | color3f outputs:out 496 | float2 ui:nodegraph:node:pos = (1785.9594, 379.68823) 497 | int ui:nodegraph:node:stackingOrder = 2827 498 | } 499 | 500 | def Shader "Add_3" 501 | { 502 | uniform token info:id = "ND_add_vector2" 503 | float2 inputs:in1.connect = 504 | float2 inputs:in2 = (1, 0) 505 | float2 outputs:out 506 | float2 ui:nodegraph:node:pos = (1455.9335, 1085.2638) 507 | int ui:nodegraph:node:stackingOrder = 2307 508 | } 509 | 510 | def Shader "Multiply_12" 511 | { 512 | uniform token info:id = "ND_multiply_vector2FA" 513 | prepend float2 inputs:in1.connect = 514 | float inputs:in2 = 0.5 515 | float2 outputs:out 516 | float2 ui:nodegraph:node:pos = (1559.2985, 1085.7007) 517 | int ui:nodegraph:node:stackingOrder = 2308 518 | } 519 | 520 | def Shader "Add_4" 521 | { 522 | uniform token info:id = "ND_add_vector2" 523 | float2 inputs:in1.connect = 524 | float2 inputs:in2 = (0, 0) 525 | float2 inputs:in2.connect = 526 | float2 outputs:out 527 | float2 ui:nodegraph:node:pos = (1454.9033, 1163.8031) 528 | int ui:nodegraph:node:stackingOrder = 2342 529 | } 530 | 531 | def Shader "Multiply_13" 532 | { 533 | uniform token info:id = "ND_multiply_vector2FA" 534 | prepend float2 inputs:in1.connect = 535 | float inputs:in2 = 0.5 536 | float2 outputs:out 537 | float2 ui:nodegraph:node:pos = (1572.5916, 1160.3933) 538 | int ui:nodegraph:node:stackingOrder = 2341 539 | } 540 | 541 | def Shader "Add_5" 542 | { 543 | uniform token info:id = "ND_add_vector2" 544 | float2 inputs:in1.connect = 545 | float2 inputs:in2 = (1, 1) 546 | float2 outputs:out 547 | float2 ui:nodegraph:node:pos = (1452.5002, 1259.6969) 548 | int ui:nodegraph:node:stackingOrder = 2385 549 | } 550 | 551 | def Shader "Multiply_14" 552 | { 553 | uniform token info:id = "ND_multiply_vector2FA" 554 | prepend float2 inputs:in1.connect = 555 | float inputs:in2 = 0.5 556 | float2 outputs:out 557 | float2 ui:nodegraph:node:pos = (1560.203, 1238.4087) 558 | int ui:nodegraph:node:stackingOrder = 2344 559 | } 560 | 561 | def Shader "Step_4" 562 | { 563 | uniform token info:id = "ND_realitykit_step_float" 564 | float inputs:edge = 0.5 565 | float inputs:in.connect = 566 | float outputs:out 567 | float2 ui:nodegraph:node:pos = (772.3061, 1128.5322) 568 | int ui:nodegraph:node:stackingOrder = 2345 569 | } 570 | 571 | def Shader "Combine2_3" 572 | { 573 | uniform token info:id = "ND_combine2_vector2" 574 | float inputs:in1.connect = None 575 | float inputs:in2.connect = 576 | float2 outputs:out 577 | float2 ui:nodegraph:node:pos = (983.2755, 1176.6377) 578 | int ui:nodegraph:node:stackingOrder = 2352 579 | } 580 | } 581 | 582 | def "plane1mx0_5m" ( 583 | active = true 584 | prepend references = @Models/plane1mx0_5m.usdz@ 585 | ) 586 | { 587 | float3 xformOp:scale = (1, 1, 1) 588 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 589 | 590 | over "Geom" 591 | { 592 | over "Plane" ( 593 | prepend apiSchemas = ["MaterialBindingAPI"] 594 | ) 595 | { 596 | rel material:binding = ( 597 | bindMaterialAs = "weakerThanDescendants" 598 | ) 599 | } 600 | } 601 | } 602 | 603 | def "frame1x0_5m" ( 604 | active = true 605 | customData = { 606 | float3 rotationEulerHint = (1.5707963, 0, 0) 607 | } 608 | prepend references = @Models/frame1x0_5m.usdz@ 609 | ) 610 | { 611 | quatf xformOp:orient = (0.70710677, 0.7071067, 0, 0) 612 | float3 xformOp:scale = (1, 1, 1) 613 | float3 xformOp:translate = (0, 0, 0.0001) 614 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 615 | } 616 | } 617 | 618 | -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Ex02.usda: -------------------------------------------------------------------------------- 1 | #usda 1.0 2 | ( 3 | customLayerData = { 4 | string creator = "Reality Composer Pro Version 2.0 (448.0.16.0.3)" 5 | } 6 | defaultPrim = "Root" 7 | metersPerUnit = 1 8 | upAxis = "Y" 9 | ) 10 | 11 | def Xform "Root" 12 | { 13 | def "warphole" ( 14 | active = true 15 | prepend references = @Models/warphole.usdz@ 16 | ) 17 | { 18 | float3 xformOp:scale = (1, 1, 1) 19 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 20 | 21 | over "Geom" 22 | { 23 | over "Cylinder" 24 | { 25 | over "primitive_0" ( 26 | prepend apiSchemas = ["MaterialBindingAPI"] 27 | ) 28 | { 29 | rel material:binding = ( 30 | bindMaterialAs = "weakerThanDescendants" 31 | ) 32 | } 33 | 34 | over "primitive_1" ( 35 | prepend apiSchemas = ["MaterialBindingAPI"] 36 | ) 37 | { 38 | rel material:binding = ( 39 | bindMaterialAs = "weakerThanDescendants" 40 | ) 41 | } 42 | } 43 | } 44 | } 45 | 46 | def Material "MatHoleSide" 47 | { 48 | token outputs:mtlx:surface.connect = 49 | token outputs:realitykit:vertex 50 | float2 ui:nodegraph:node:pos = (20, 20) 51 | int ui:nodegraph:node:stackingOrder = 1 52 | float2 ui:nodegraph:realitykit:subgraphOutputs:pos = (1365.6831, 94.400246) 53 | int ui:nodegraph:realitykit:subgraphOutputs:stackingOrder = 1070 54 | 55 | def Shader "UnlitSurface" 56 | { 57 | uniform token info:id = "ND_realitykit_unlit_surfaceshader" 58 | bool inputs:applyPostProcessToneMap 59 | color3f inputs:color.connect = 60 | bool inputs:hasPremultipliedAlpha 61 | float inputs:opacity.connect = 62 | float inputs:opacityThreshold 63 | token outputs:out 64 | float2 ui:nodegraph:node:pos = (1139.9756, 179.64314) 65 | int ui:nodegraph:node:stackingOrder = 446 66 | } 67 | 68 | def Shader "Noise2D_1" 69 | { 70 | uniform token info:id = "ND_noise2d_float" 71 | float inputs:amplitude = -2 72 | float inputs:amplitude.connect = 73 | float inputs:pivot = 2 74 | float2 inputs:texcoord.connect = 75 | float outputs:out 76 | float2 ui:nodegraph:node:pos = (325.48428, -65.52462) 77 | int ui:nodegraph:node:stackingOrder = 487 78 | } 79 | 80 | def Shader "Combine3" 81 | { 82 | uniform token info:id = "ND_combine3_color3" 83 | float inputs:in1.connect = 84 | float inputs:in2.connect = 85 | float inputs:in3.connect = 86 | color3f outputs:out 87 | float2 ui:nodegraph:node:pos = (561.2884, -106.076355) 88 | int ui:nodegraph:node:stackingOrder = 487 89 | } 90 | 91 | def Shader "TextureCoordinates" 92 | { 93 | uniform token info:id = "ND_texcoord_vector2" 94 | float2 outputs:out 95 | float2 ui:nodegraph:node:pos = (-796.75256, 429.95703) 96 | int ui:nodegraph:node:stackingOrder = 998 97 | } 98 | 99 | def Shader "Time" 100 | { 101 | uniform token info:id = "ND_time_float" 102 | float outputs:out 103 | float2 ui:nodegraph:node:pos = (-658.8438, -29.868357) 104 | int ui:nodegraph:node:stackingOrder = 799 105 | } 106 | 107 | def Shader "Multiply_1" 108 | { 109 | uniform token info:id = "ND_multiply_float" 110 | float inputs:in1.connect = 111 | float inputs:in2 = -5 112 | float outputs:out 113 | float2 ui:nodegraph:node:pos = (-12.765842, 190.66928) 114 | int ui:nodegraph:node:stackingOrder = 1057 115 | } 116 | 117 | def Shader "Separate2" 118 | { 119 | uniform token info:id = "ND_separate2_vector2" 120 | float2 inputs:in.connect = 121 | float outputs:outx 122 | float outputs:outy 123 | float2 ui:nodegraph:node:pos = (451.83575, 327.21768) 124 | int ui:nodegraph:node:stackingOrder = 1066 125 | } 126 | 127 | def Shader "Oneminus" 128 | { 129 | uniform token info:id = "ND_realitykit_oneminus_float" 130 | float inputs:in.connect = 131 | float outputs:out 132 | float2 ui:nodegraph:node:pos = (613.549, 287.38562) 133 | int ui:nodegraph:node:stackingOrder = 1068 134 | } 135 | 136 | def Shader "Remap_1" 137 | { 138 | uniform token info:id = "ND_remap_color3" 139 | color3f inputs:in.connect = 140 | color3f inputs:inhigh = (1, 1, 1) ( 141 | colorSpace = "srgb_texture" 142 | ) 143 | color3f inputs:inlow 144 | color3f inputs:outhigh = (0.9687736, 0.9990856, 1) ( 145 | colorSpace = "srgb_texture" 146 | ) 147 | color3f inputs:outlow = (0.7458255, 0.8351851, 0.88618606) ( 148 | colorSpace = "srgb_texture" 149 | ) 150 | color3f outputs:out 151 | float2 ui:nodegraph:node:pos = (746.5747, 112.243965) 152 | int ui:nodegraph:node:stackingOrder = 454 153 | } 154 | 155 | def Shader "Sin" 156 | { 157 | uniform token info:id = "ND_sin_float" 158 | float inputs:in.connect = 159 | float outputs:out 160 | float2 ui:nodegraph:node:pos = (67.08527, -104.13013) 161 | int ui:nodegraph:node:stackingOrder = 493 162 | } 163 | 164 | def Shader "Multiply_3" 165 | { 166 | uniform token info:id = "ND_multiply_float" 167 | float inputs:in1.connect = 168 | float inputs:in2 = 3 169 | float outputs:out 170 | float2 ui:nodegraph:node:pos = (190.80727, -95.03593) 171 | int ui:nodegraph:node:stackingOrder = 491 172 | } 173 | 174 | def Shader "Divide" 175 | { 176 | uniform token info:id = "ND_divide_float" 177 | float inputs:in1.connect = 178 | float inputs:in2 = 2 179 | float outputs:out 180 | float2 ui:nodegraph:node:pos = (-50.819252, -106.023796) 181 | int ui:nodegraph:node:stackingOrder = 495 182 | } 183 | 184 | def Shader "Remap_2" 185 | { 186 | uniform token info:id = "ND_remap_color3" 187 | color3f inputs:in.connect = 188 | color3f inputs:inhigh = (0.66891575, 0.66891575, 0.66891575) ( 189 | colorSpace = "srgb_texture" 190 | ) 191 | color3f inputs:inlow = (0.16755447, 0.16755447, 0.16755447) ( 192 | colorSpace = "srgb_texture" 193 | ) 194 | color3f inputs:outhigh = (0.6830014, 0.9827293, 1) ( 195 | colorSpace = "srgb_texture" 196 | ) 197 | color3f inputs:outlow 198 | color3f outputs:out 199 | float2 ui:nodegraph:node:pos = (741.37286, -82.25717) 200 | int ui:nodegraph:node:stackingOrder = 452 201 | } 202 | 203 | def Shader "Add_1" 204 | { 205 | uniform token info:id = "ND_add_color3" 206 | color3f inputs:in1.connect = 207 | color3f inputs:in2.connect = 208 | color3f outputs:out 209 | float2 ui:nodegraph:node:pos = (957.3014, 35.67418) 210 | int ui:nodegraph:node:stackingOrder = 448 211 | } 212 | 213 | def Shader "Divide_1" 214 | { 215 | uniform token info:id = "ND_divide_color3FA" 216 | color3f inputs:in1.connect = 217 | float inputs:in2 = 0.5 218 | color3f outputs:out 219 | float2 ui:nodegraph:node:pos = (860.9795, -15.646318) 220 | int ui:nodegraph:node:stackingOrder = 450 221 | } 222 | 223 | def Shader "Range" 224 | { 225 | uniform token info:id = "ND_range_float" 226 | bool inputs:doclamp 227 | float inputs:gamma = 0.7 228 | float inputs:in.connect = 229 | float inputs:outhigh 230 | float outputs:out 231 | float2 ui:nodegraph:node:pos = (757.44226, 349.16348) 232 | int ui:nodegraph:node:stackingOrder = 489 233 | } 234 | 235 | def Shader "Separate2_1" 236 | { 237 | uniform token info:id = "ND_separate2_vector2" 238 | float2 inputs:in.connect = 239 | float outputs:outx 240 | float outputs:outy 241 | float2 ui:nodegraph:node:pos = (-600.2774, 193.76372) 242 | int ui:nodegraph:node:stackingOrder = 996 243 | } 244 | 245 | def Shader "IfGreater" 246 | { 247 | uniform token info:id = "ND_ifgreater_float" 248 | float inputs:in1.connect = 249 | float inputs:in2.connect = 250 | float inputs:value1.connect = 251 | float inputs:value2 = 0.5 252 | float outputs:out 253 | float2 ui:nodegraph:node:pos = (-11.59174, 26.382275) 254 | int ui:nodegraph:node:stackingOrder = 735 255 | } 256 | 257 | def Shader "Multiply_4" 258 | { 259 | uniform token info:id = "ND_multiply_float" 260 | float inputs:in1.connect = 261 | float inputs:in2 = 2 262 | float outputs:out 263 | float2 ui:nodegraph:node:pos = (-305.8568, 174.81863) 264 | int ui:nodegraph:node:stackingOrder = 1008 265 | } 266 | 267 | def Shader "Subtract" 268 | { 269 | uniform token info:id = "ND_subtract_float" 270 | float inputs:in1.connect = 271 | float inputs:in2 = 0.5 272 | float outputs:out 273 | float2 ui:nodegraph:node:pos = (-371.29382, -14.970964) 274 | int ui:nodegraph:node:stackingOrder = 1001 275 | } 276 | 277 | def Shader "Multiply_5" 278 | { 279 | uniform token info:id = "ND_multiply_float" 280 | float inputs:in1.connect = 281 | float inputs:in2 = 2 282 | float outputs:out 283 | float2 ui:nodegraph:node:pos = (-285.10638, -8.485007) 284 | int ui:nodegraph:node:stackingOrder = 1004 285 | } 286 | 287 | def Shader "Oneminus_1" 288 | { 289 | uniform token info:id = "ND_realitykit_oneminus_float" 290 | float inputs:in.connect = 291 | float outputs:out 292 | float2 ui:nodegraph:node:pos = (-189.82413, -5.641369) 293 | int ui:nodegraph:node:stackingOrder = 1006 294 | } 295 | 296 | def Shader "Combine2_1" 297 | { 298 | uniform token info:id = "ND_combine2_vector2" 299 | float inputs:in1.connect = 300 | float inputs:in2.connect = 301 | float2 outputs:out 302 | float2 ui:nodegraph:node:pos = (253.32803, 184.00883) 303 | int ui:nodegraph:node:stackingOrder = 1061 304 | } 305 | 306 | def Shader "Multiply_6" 307 | { 308 | uniform token info:id = "ND_multiply_float" 309 | float inputs:in1.connect = 310 | float inputs:in2 = 10 311 | float outputs:out 312 | float2 ui:nodegraph:node:pos = (102.98321, 151.31755) 313 | int ui:nodegraph:node:stackingOrder = 1063 314 | } 315 | 316 | def Shader "Multiply_7" 317 | { 318 | uniform token info:id = "ND_multiply_float" 319 | float inputs:in1.connect = 320 | float inputs:in2 = 5 321 | float inputs:in2.connect = 322 | float outputs:out 323 | float2 ui:nodegraph:node:pos = (-15.030858, 263.81973) 324 | int ui:nodegraph:node:stackingOrder = 1055 325 | } 326 | 327 | def Shader "Add_2" 328 | { 329 | uniform token info:id = "ND_add_float" 330 | float inputs:in1.connect = 331 | float inputs:in2.connect = 332 | float outputs:out 333 | float2 ui:nodegraph:node:pos = (96.80673, 226.62265) 334 | int ui:nodegraph:node:stackingOrder = 1059 335 | } 336 | 337 | def Shader "Sin_1" 338 | { 339 | uniform token info:id = "ND_sin_float" 340 | float inputs:in.connect = 341 | float outputs:out 342 | float2 ui:nodegraph:node:pos = (-348.37613, 303.109) 343 | int ui:nodegraph:node:stackingOrder = 1010 344 | } 345 | 346 | def Shader "Add_3" 347 | { 348 | uniform token info:id = "ND_add_float" 349 | float inputs:in1.connect = 350 | float inputs:in2 = 2 351 | float outputs:out 352 | float2 ui:nodegraph:node:pos = (-209.02843, 314.08453) 353 | int ui:nodegraph:node:stackingOrder = 1053 354 | } 355 | 356 | def Shader "Multiply_8" 357 | { 358 | uniform token info:id = "ND_multiply_float" 359 | float inputs:in1.connect = 360 | float inputs:in2 = 4 361 | float outputs:out 362 | float2 ui:nodegraph:node:pos = (-108.800705, 305.74432) 363 | int ui:nodegraph:node:stackingOrder = 1053 364 | } 365 | } 366 | 367 | def Xform "Particle" ( 368 | customData = { 369 | float3 rotationEulerHint = (1.5707964, 0, 0) 370 | } 371 | ) 372 | { 373 | float2 ui:nodegraph:node:pos = (202.68098, 184.34254) 374 | int ui:nodegraph:node:stackingOrder = 2 375 | quatf xformOp:orient = (0.70710677, 0.70710677, 0, 0) 376 | float3 xformOp:scale = (0.99999964, 0.99999964, 0.99999964) 377 | float3 xformOp:translate = (0, 0, -0.5) 378 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 379 | 380 | def RealityKitComponent "VFXEmitter" 381 | { 382 | token info:id = "RealityKit.VFXEmitter" 383 | 384 | def RealityKitStruct "currentState" 385 | { 386 | token birthLocation = "Volume" 387 | int64 burstCount = 1000 388 | token emitterShape = "Cone" 389 | bool isLocal = 1 390 | bool isLocalFields = 1 391 | float particleSpeed = 1 392 | float radialAmount = 6.2831855 393 | float3 shapeSize = (0.5, 0.5, 0.5) 394 | 395 | def RealityKitStruct "mainEmitter" 396 | { 397 | float birthRate = 50 398 | float colorEvolutionPower = 10 399 | float4 endColorA = (0.9999908, 1, 1, 1) 400 | double particleLifeSpan = 5 401 | float particleSize = 0.01 402 | float particleSizeVariation = 0.003 403 | float4 startColorA = (0.004569899, 0.0068443906, 1, 1) 404 | float4 startColorB = (0.8378932, 0.9351597, 1, 1) 405 | float stretchFactor = 10 406 | bool useEndColor = 1 407 | bool useEndColorRange = 0 408 | bool useStartColorRange = 1 409 | } 410 | 411 | def RealityKitStruct "spawnedEmitter" 412 | { 413 | } 414 | } 415 | } 416 | } 417 | } 418 | 419 | -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Ex03.usda: -------------------------------------------------------------------------------- 1 | #usda 1.0 2 | ( 3 | customLayerData = { 4 | string creator = "Reality Composer Pro Version 2.0 (448.0.16.0.3)" 5 | } 6 | defaultPrim = "Root" 7 | metersPerUnit = 1 8 | upAxis = "Y" 9 | ) 10 | 11 | def Xform "Root" 12 | { 13 | reorder nameChildren = ["jewel", "MatJewel", "MatOuter"] 14 | def "jewel" ( 15 | active = false 16 | references = @Models/jewel.usdz@ 17 | ) 18 | { 19 | reorder nameChildren = ["Sphere", "Materials", "Geom"] 20 | float3 xformOp:scale = (1, 1, 1) 21 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 22 | 23 | over "Geom" 24 | { 25 | over "Icosphere" ( 26 | prepend apiSchemas = ["MaterialBindingAPI"] 27 | ) 28 | { 29 | rel material:binding = ( 30 | bindMaterialAs = "weakerThanDescendants" 31 | ) 32 | } 33 | } 34 | 35 | def Sphere "Sphere" ( 36 | active = true 37 | prepend apiSchemas = ["MaterialBindingAPI"] 38 | ) 39 | { 40 | rel material:binding = ( 41 | bindMaterialAs = "weakerThanDescendants" 42 | ) 43 | double radius = 0.35000000000000003 44 | quatf xformOp:orient = (1, 0, 0, 0) 45 | float3 xformOp:scale = (1, 1, 1) 46 | float3 xformOp:translate = (0, 0, 0) 47 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 48 | 49 | def Material "DefaultMaterial" 50 | { 51 | token outputs:surface.connect = 52 | 53 | def Shader "DefaultSurfaceShader" 54 | { 55 | uniform token info:id = "UsdPreviewSurface" 56 | color3f inputs:diffuseColor = (1, 1, 1) 57 | float inputs:roughness = 0.75 58 | token outputs:surface 59 | } 60 | } 61 | } 62 | } 63 | 64 | def Material "MatJewel" 65 | { 66 | token outputs:mtlx:surface.connect = 67 | token outputs:realitykit:vertex 68 | float2 ui:nodegraph:node:pos = (40, 40) 69 | int ui:nodegraph:node:stackingOrder = 2 70 | float2 ui:nodegraph:realitykit:subgraphOutputs:pos = (333.7788, 88.035904) 71 | float2 ui:nodegraph:realitykit:subgraphOutputs:size = (181.5, 99) 72 | int ui:nodegraph:realitykit:subgraphOutputs:stackingOrder = 788 73 | 74 | def Shader "PreviewSurface" 75 | { 76 | uniform token info:id = "ND_UsdPreviewSurface_surfaceshader" 77 | color3f inputs:diffuseColor.connect = 78 | float inputs:ior = 1.5 79 | float inputs:metallic 80 | float3 inputs:normal 81 | float inputs:occlusion = 1 82 | float inputs:opacity 83 | float inputs:roughness = 0 84 | token outputs:out 85 | float2 ui:nodegraph:node:pos = (104.74362, 81.872955) 86 | float2 ui:nodegraph:node:size = (148.5, 199) 87 | int ui:nodegraph:node:stackingOrder = 788 88 | } 89 | 90 | def Shader "RealitykitEnvironmentRadiance" 91 | { 92 | uniform token info:id = "ND_realitykit_environment_radiance" 93 | color3f inputs:baseColor = (1, 1, 1) ( 94 | colorSpace = "srgb_texture" 95 | ) 96 | half inputs:metallic = 1.5 97 | float3 inputs:normal.connect = None 98 | half inputs:roughness = 0 99 | half inputs:specular = 0 100 | color3f outputs:diffuseRadiance 101 | color3f outputs:specularRadiance 102 | float2 ui:nodegraph:node:pos = (-165.2344, 95.54971) 103 | float2 ui:nodegraph:node:size = (244.5, 199) 104 | int ui:nodegraph:node:stackingOrder = 788 105 | string[] ui:nodegraph:realitykit:node:attributesShowingChildren = ["inputs:specular", "inputs:metallic", "inputs:metallic", "inputs:roughness", "inputs:roughness", "inputs:baseColor"] 106 | } 107 | } 108 | 109 | def Material "MatOuter" 110 | { 111 | token outputs:mtlx:surface.connect = 112 | token outputs:realitykit:vertex 113 | float2 ui:nodegraph:realitykit:subgraphOutputs:pos = (518.40234, -8.324219) 114 | int ui:nodegraph:realitykit:subgraphOutputs:stackingOrder = 190 115 | 116 | def Shader "PreviewSurface" 117 | { 118 | uniform token info:id = "ND_UsdPreviewSurface_surfaceshader" 119 | color3f inputs:diffuseColor = (0.97162604, 0.34210688, 1) ( 120 | colorSpace = "srgb_texture" 121 | ) 122 | color3f inputs:diffuseColor.connect = 123 | float inputs:opacity = 0.2 124 | float inputs:roughness = 0.1 125 | token outputs:out 126 | float2 ui:nodegraph:node:pos = (284.92188, -0.65234375) 127 | int ui:nodegraph:node:stackingOrder = 190 128 | } 129 | 130 | def Shader "ViewDirection" 131 | { 132 | uniform token info:id = "ND_realitykit_viewdirection_vector3" 133 | float3 outputs:out 134 | float2 ui:nodegraph:node:pos = (-293.09766, 35.902344) 135 | int ui:nodegraph:node:stackingOrder = 190 136 | } 137 | 138 | def Shader "Normal" 139 | { 140 | uniform token info:id = "ND_normal_vector3" 141 | float3 outputs:out 142 | float2 ui:nodegraph:node:pos = (-261.8086, 120.92969) 143 | int ui:nodegraph:node:stackingOrder = 190 144 | string[] ui:nodegraph:realitykit:node:attributesShowingChildren = ["outputs:out"] 145 | } 146 | 147 | def Shader "DotProduct" 148 | { 149 | uniform token info:id = "ND_dotproduct_vector3" 150 | float3 inputs:in1.connect = 151 | float3 inputs:in2.connect = 152 | float outputs:out 153 | float2 ui:nodegraph:node:pos = (-85.47266, 61.566406) 154 | int ui:nodegraph:node:stackingOrder = 190 155 | } 156 | 157 | def Shader "ConstantColor3" 158 | { 159 | uniform token info:id = "ND_constant_color3" 160 | color3f inputs:value = (0.96353084, 0.050136775, 1) ( 161 | colorSpace = "srgb_texture" 162 | ) 163 | color3f outputs:out 164 | float2 ui:nodegraph:node:pos = (-39.82422, -29.890625) 165 | int ui:nodegraph:node:stackingOrder = 190 166 | } 167 | 168 | def Shader "Multiply" 169 | { 170 | uniform token info:id = "ND_multiply_color3FA" 171 | prepend color3f inputs:in1.connect = 172 | float inputs:in2.connect = 173 | color3f outputs:out 174 | float2 ui:nodegraph:node:pos = (98.38281, 21.933594) 175 | int ui:nodegraph:node:stackingOrder = 190 176 | } 177 | } 178 | 179 | def "jewel1" ( 180 | active = true 181 | references = @Models/jewel1.usdz@ 182 | ) 183 | { 184 | reorder nameChildren = ["Materials", "Geom", "Sphere_1"] 185 | float3 xformOp:scale = (1, 1, 1) 186 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 187 | 188 | def Sphere "Sphere_1" ( 189 | active = true 190 | prepend apiSchemas = ["MaterialBindingAPI"] 191 | ) 192 | { 193 | rel material:binding = ( 194 | bindMaterialAs = "weakerThanDescendants" 195 | ) 196 | double radius = 0.35000000000000003 197 | float2 ui:nodegraph:node:pos = (149.21484, 36.933594) 198 | int ui:nodegraph:node:stackingOrder = 1 199 | quatf xformOp:orient = (1, 0, 0, 0) 200 | float3 xformOp:scale = (0.8, 1, 0.4) 201 | float3 xformOp:translate = (0, 0, 0) 202 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 203 | 204 | def Material "DefaultMaterial" 205 | { 206 | token outputs:surface.connect = 207 | 208 | def Shader "DefaultSurfaceShader" 209 | { 210 | uniform token info:id = "UsdPreviewSurface" 211 | color3f inputs:diffuseColor = (1, 1, 1) 212 | float inputs:roughness = 0.75 213 | token outputs:surface 214 | } 215 | } 216 | } 217 | 218 | over "Geom" 219 | { 220 | over "Icosphere" ( 221 | prepend apiSchemas = ["MaterialBindingAPI"] 222 | ) 223 | { 224 | rel material:binding = ( 225 | bindMaterialAs = "weakerThanDescendants" 226 | ) 227 | } 228 | } 229 | } 230 | } 231 | 232 | -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Ex04.usda: -------------------------------------------------------------------------------- 1 | #usda 1.0 2 | ( 3 | customLayerData = { 4 | string creator = "Reality Composer Pro Version 2.0 (448.0.16.0.3)" 5 | } 6 | defaultPrim = "Root" 7 | metersPerUnit = 1 8 | upAxis = "Y" 9 | ) 10 | 11 | def Xform "Root" 12 | { 13 | reorder nameChildren = ["plane1mx1m", "VolumetricMaterial"] 14 | def "plane1mx1m" ( 15 | active = true 16 | customData = { 17 | float3 rotationEulerHint = (1.5707963, 0, 0) 18 | } 19 | references = @Models/plane1mx1m.usdz@ 20 | ) 21 | { 22 | quatf xformOp:orient = (0.70710677, 0.7071067, 0, 0) 23 | float3 xformOp:scale = (1, 1, 1) 24 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 25 | 26 | over "Geom" 27 | { 28 | over "Plane" ( 29 | prepend apiSchemas = ["MaterialBindingAPI"] 30 | ) 31 | { 32 | rel material:binding = ( 33 | bindMaterialAs = "weakerThanDescendants" 34 | ) 35 | } 36 | } 37 | } 38 | 39 | def Material "VolumetricMaterial" 40 | { 41 | token outputs:mtlx:surface.connect = 42 | token outputs:realitykit:vertex 43 | float2 ui:nodegraph:realitykit:subgraphOutputs:pos = (950.4999, 78.46741) 44 | int ui:nodegraph:realitykit:subgraphOutputs:stackingOrder = 416 45 | 46 | def Shader "Combine3" 47 | { 48 | uniform token info:id = "ND_combine3_vector3" 49 | float inputs:in1.connect = 50 | float inputs:in2.connect = 51 | float inputs:in3 = 0.5 52 | float inputs:in3.connect = 53 | float3 outputs:out 54 | float2 ui:nodegraph:node:pos = (177.96512, 133.98364) 55 | int ui:nodegraph:node:stackingOrder = 416 56 | } 57 | 58 | def Shader "Separate2" 59 | { 60 | uniform token info:id = "ND_separate2_vector2" 61 | float2 inputs:in.connect = 62 | float outputs:outx 63 | float outputs:outy 64 | float2 ui:nodegraph:node:pos = (3.2451568, 54.76785) 65 | int ui:nodegraph:node:stackingOrder = 416 66 | } 67 | 68 | def Shader "TextureCoordinates" 69 | { 70 | uniform token info:id = "ND_texcoord_vector2" 71 | float2 outputs:out 72 | float2 ui:nodegraph:node:pos = (-191.94598, -6.680681) 73 | int ui:nodegraph:node:stackingOrder = 416 74 | } 75 | 76 | def Shader "Image3D" 77 | { 78 | uniform token info:id = "ND_RealityKitTexture3D_color3" 79 | float inputs:bias 80 | color3f inputs:default 81 | float inputs:dynamic_min_lod_clamp 82 | asset inputs:file = @Textures/nebula_volume.ktx@ 83 | float inputs:min_lod_clamp 84 | string inputs:mip_filter = "linear" 85 | int3 inputs:offset 86 | float3 inputs:texcoord.connect = 87 | color3f outputs:out 88 | float2 ui:nodegraph:node:pos = (461.32962, 62.60586) 89 | int ui:nodegraph:node:stackingOrder = 416 90 | } 91 | 92 | def Shader "Time" 93 | { 94 | uniform token info:id = "ND_time_float" 95 | float outputs:out 96 | float2 ui:nodegraph:node:pos = (-315.41318, 176.92056) 97 | int ui:nodegraph:node:stackingOrder = 416 98 | } 99 | 100 | def Shader "Abs" 101 | { 102 | uniform token info:id = "ND_absval_float" 103 | float inputs:in.connect = 104 | float outputs:out 105 | float2 ui:nodegraph:node:pos = (59.592644, 218.88791) 106 | int ui:nodegraph:node:stackingOrder = 416 107 | } 108 | 109 | def Shader "Sin" 110 | { 111 | uniform token info:id = "ND_sin_float" 112 | float inputs:in.connect = 113 | float outputs:out 114 | float2 ui:nodegraph:node:pos = (-90.55787, 215.48184) 115 | int ui:nodegraph:node:stackingOrder = 416 116 | } 117 | 118 | def Shader "Multiply" 119 | { 120 | uniform token info:id = "ND_multiply_float" 121 | float inputs:in1.connect = 122 | float inputs:in2 = 0.2 123 | float outputs:out 124 | float2 ui:nodegraph:node:pos = (-205.61856, 272.53778) 125 | int ui:nodegraph:node:stackingOrder = 416 126 | } 127 | 128 | def Shader "UnlitSurface" 129 | { 130 | uniform token info:id = "ND_realitykit_unlit_surfaceshader" 131 | bool inputs:applyPostProcessToneMap 132 | color3f inputs:color.connect = 133 | bool inputs:hasPremultipliedAlpha 134 | float inputs:opacity 135 | float inputs:opacityThreshold 136 | token outputs:out 137 | float2 ui:nodegraph:node:pos = (731.1561, 61.092403) 138 | int ui:nodegraph:node:stackingOrder = 416 139 | } 140 | } 141 | } 142 | 143 | -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Ex05.usda: -------------------------------------------------------------------------------- 1 | #usda 1.0 2 | ( 3 | customLayerData = { 4 | string creator = "Reality Composer Pro Version 2.0 (448.0.16.0.3)" 5 | } 6 | defaultPrim = "Root" 7 | metersPerUnit = 1 8 | upAxis = "Y" 9 | ) 10 | 11 | def Xform "Root" 12 | { 13 | reorder nameChildren = ["plane1mx1m", "MaterialDepth"] 14 | def "plane1mx1m" ( 15 | active = true 16 | customData = { 17 | float3 rotationEulerHint = (1.5707963, 0, 0) 18 | } 19 | references = @Models/plane1mx1m.usdz@ 20 | ) 21 | { 22 | reorder nameChildren = ["ParticleEmitter", "Geom", "Materials"] 23 | quatf xformOp:orient = (0.70710677, 0.7071067, 0, 0) 24 | float3 xformOp:scale = (1, 1, 1) 25 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 26 | 27 | over "Geom" 28 | { 29 | over "Plane" ( 30 | prepend apiSchemas = ["MaterialBindingAPI"] 31 | ) 32 | { 33 | rel material:binding = ( 34 | bindMaterialAs = "weakerThanDescendants" 35 | ) 36 | } 37 | } 38 | 39 | def Xform "ParticleEmitter" 40 | { 41 | quatf xformOp:orient = (0.70710677, -0.70710677, 0, 0) 42 | float3 xformOp:scale = (1, 1, 1) 43 | float3 xformOp:translate = (0, -0.09002795, 0.48743773) 44 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 45 | 46 | def RealityKitComponent "VFXEmitter" 47 | { 48 | token info:id = "RealityKit.VFXEmitter" 49 | 50 | def RealityKitStruct "currentState" 51 | { 52 | token birthDirection = "Normal" 53 | token birthLocation = "Surface" 54 | int64 burstCount = 50 55 | float3 emissionDirection = (0, 0, 0) 56 | double emissionDuration = 1 57 | double emissionDurationVariation = 0 58 | token emitterShape = "Plane" 59 | double idleDuration = 0 60 | double idleDurationVariation = 0 61 | bool isLocal = 1 62 | bool isSpawningEnabled = 1 63 | bool loops = 1 64 | float particleSpeed = 0.06 65 | float particleSpeedVariation = 0.04 66 | float3 shapeSize = (0.5, 0.5, 0.01) 67 | bool spawnInheritParentColor = 1 68 | token spawnOccasion = "OnUpdate" 69 | float spawnSpreadFactor = 0 70 | float spawnSpreadFactorVariation = 0 71 | float spawnVelocityFactor = 1 72 | double warmupDuration = 1.5 73 | 74 | def RealityKitStruct "mainEmitter" 75 | { 76 | float3 acceleration = (0, 0.1, 0) 77 | token animationRepeatMode = "Looping" 78 | token billboardMode = "Billboard" 79 | float birthRate = 10 80 | float birthRateVariation = 0 81 | token blendMode = "Additive" 82 | float colorEvolutionPower = 1 83 | int64 columnCount = 4 84 | float dampingFactor = 0.25 85 | float4 endColorA = (0.9528154, 1, 0.91642094, 1) 86 | float4 endColorB = (0, 0.98059916, 1, 1) 87 | float frameRate = 30 88 | float frameRateVariation = 0 89 | int64 initialFrame = 0 90 | int64 initialFrameVariation = 2 91 | bool isAnimated = 1 92 | bool isLightingEnabled = 0 93 | float noiseAnimationSpeed = 1 94 | float noiseScale = 1 95 | float noiseStrength = 0.1 96 | token opacityOverLife = "GradualFadeInOut" 97 | float particleAngle = 0 98 | float particleAngleVariation = 0.5 99 | float particleAngularVelocity = 0.25 100 | float particleAngularVelocityVariation = 0.5 101 | asset particleImage = @ParticleEmitterPresetTextures/twinkle.exr@ 102 | double particleLifeSpan = 3 103 | double particleLifeSpanVariation = 0.2 104 | float particleMass = 1 105 | float particleMassVariation = 0.2 106 | float particleSize = 0.02 107 | float particleSizeVariation = 0.004 108 | float3 radialGravityCenter = (1, 1, 0) 109 | float radialGravityStrength = 0 110 | int64 rowCount = 4 111 | float sizeMultiplierAtEndOfLifespan = 0.35 112 | float sizeMultiplierAtEndOfLifespanPower = 3 113 | token sortOrder = "IncreasingDepth" 114 | float spreadingAngle = 0 115 | float4 startColorA = (1, 0.9717117, 0.33952853, 1) 116 | float4 startColorB = (0.9986965, 0.9674097, 0, 1) 117 | float stretchFactor = 0 118 | bool useEndColor = 1 119 | bool useEndColorRange = 0 120 | bool useStartColorRange = 0 121 | float3 vortexDirection = (0, 1, 0) 122 | float vortexStrength = 0 123 | } 124 | 125 | def RealityKitStruct "spawnedEmitter" 126 | { 127 | float3 acceleration = (0, -0.04, 0) 128 | token animationRepeatMode = "AutoReverse" 129 | token billboardMode = "Billboard" 130 | float birthRate = 25 131 | float birthRateVariation = 0 132 | token blendMode = "Additive" 133 | float colorEvolutionPower = 0 134 | int64 columnCount = 4 135 | float dampingFactor = 3 136 | float4 endColorA = (0, 0.98059916, 1, 1) 137 | float4 endColorB = (1, 0.051991113, 1, 1) 138 | float frameRate = 24 139 | float frameRateVariation = 0 140 | int64 initialFrame = 2 141 | int64 initialFrameVariation = 4 142 | bool isAnimated = 1 143 | bool isLightingEnabled = 0 144 | float noiseAnimationSpeed = 0.25 145 | float noiseScale = 1 146 | float noiseStrength = 0.1 147 | token opacityOverLife = "GradualFadeInOut" 148 | float particleAngle = 0.745 149 | float particleAngleVariation = 0.25 150 | float particleAngularVelocity = 0.25 151 | float particleAngularVelocityVariation = 0 152 | asset particleImage = @ParticleEmitterPresetTextures/twinkle.exr@ 153 | double particleLifeSpan = 0.75 154 | double particleLifeSpanVariation = 0.25 155 | float particleMass = 1 156 | float particleMassVariation = 2 157 | float particleSize = 0.02 158 | float particleSizeVariation = 0.004 159 | float3 radialGravityCenter = (0, 0, 0) 160 | float radialGravityStrength = 0 161 | int64 rowCount = 4 162 | float sizeMultiplierAtEndOfLifespan = 0 163 | float sizeMultiplierAtEndOfLifespanPower = 1 164 | token sortOrder = "IncreasingID" 165 | float spreadingAngle = 0 166 | float4 startColorA = (1, 0.051991113, 1, 0.04) 167 | float4 startColorB = (0, 0.98059916, 1, 0.04) 168 | float stretchFactor = 0 169 | bool useEndColor = 0 170 | bool useEndColorRange = 1 171 | bool useStartColorRange = 1 172 | float3 vortexDirection = (0, 1, 0) 173 | float vortexStrength = 0 174 | } 175 | } 176 | } 177 | } 178 | } 179 | 180 | def Material "MaterialDepth" 181 | { 182 | token outputs:mtlx:surface.connect = 183 | token outputs:realitykit:vertex 184 | float2 ui:nodegraph:realitykit:subgraphOutputs:pos = (335.25, 100.5) 185 | 186 | def Shader "Divide" 187 | { 188 | uniform token info:id = "ND_divide_float" 189 | float inputs:in1.connect = 190 | float inputs:in2 = 5 191 | float outputs:out 192 | float2 ui:nodegraph:node:pos = (-592.00024, 297.05115) 193 | int ui:nodegraph:node:stackingOrder = 426 194 | } 195 | 196 | def Shader "Add" 197 | { 198 | uniform token info:id = "ND_add_float" 199 | float inputs:in1.connect = 200 | float inputs:in2 = 0.02 201 | float outputs:out 202 | float2 ui:nodegraph:node:pos = (-324.57166, 185.99077) 203 | int ui:nodegraph:node:stackingOrder = 418 204 | } 205 | 206 | def Shader "Separate3_1" 207 | { 208 | uniform token info:id = "ND_separate3_color3" 209 | color3f inputs:in.connect = 210 | float outputs:outb 211 | float outputs:outg 212 | float outputs:outr 213 | float2 ui:nodegraph:node:pos = (-593.6387, 216.38676) 214 | int ui:nodegraph:node:stackingOrder = 418 215 | } 216 | 217 | def Shader "Sin" 218 | { 219 | uniform token info:id = "ND_sin_float" 220 | float inputs:in.connect = 221 | float outputs:out 222 | float2 ui:nodegraph:node:pos = (-473.47302, 296.51306) 223 | int ui:nodegraph:node:stackingOrder = 418 224 | } 225 | 226 | def Shader "Step" 227 | { 228 | uniform token info:id = "ND_realitykit_step_float" 229 | float inputs:edge = 0.5 230 | float inputs:edge.connect = 231 | float inputs:in.connect = 232 | float outputs:out 233 | float2 ui:nodegraph:node:pos = (-183.76457, 269.70178) 234 | int ui:nodegraph:node:stackingOrder = 418 235 | } 236 | 237 | def Shader "Image_1" 238 | { 239 | uniform token info:id = "ND_image_color3" 240 | color3f inputs:default 241 | asset inputs:file = @Textures/girl.jpg@ 242 | string inputs:filtertype 243 | float2 inputs:texcoord 244 | string inputs:uaddressmode 245 | string inputs:vaddressmode 246 | color3f outputs:out 247 | float2 ui:nodegraph:node:pos = (-864.75354, 41.43551) 248 | int ui:nodegraph:node:stackingOrder = 423 249 | } 250 | 251 | def Shader "IfGreater" 252 | { 253 | uniform token info:id = "ND_ifgreater_color3" 254 | color3f inputs:in1 = (1, 0.95918274, 0.6811088) ( 255 | colorSpace = "srgb_texture" 256 | ) 257 | color3f inputs:in2.connect = 258 | float inputs:value1.connect = 259 | float inputs:value2.connect = 260 | color3f outputs:out 261 | float2 ui:nodegraph:node:pos = (-186.14513, 65.391655) 262 | int ui:nodegraph:node:stackingOrder = 418 263 | } 264 | 265 | def Shader "Time" 266 | { 267 | uniform token info:id = "ND_time_float" 268 | float outputs:out 269 | float2 ui:nodegraph:node:pos = (-735.2523, 301.48602) 270 | int ui:nodegraph:node:stackingOrder = 418 271 | } 272 | 273 | def Shader "Image" 274 | { 275 | uniform token info:id = "ND_image_color3" 276 | color3f inputs:default 277 | asset inputs:file = @Textures/girl.png@ 278 | string inputs:filtertype 279 | float2 inputs:texcoord 280 | string inputs:uaddressmode 281 | string inputs:vaddressmode 282 | color3f outputs:out 283 | float2 ui:nodegraph:node:pos = (-606.3114, -38.83895) 284 | int ui:nodegraph:node:stackingOrder = 422 285 | } 286 | 287 | def Shader "UnlitSurface" 288 | { 289 | uniform token info:id = "ND_realitykit_unlit_surfaceshader" 290 | bool inputs:applyPostProcessToneMap 291 | color3f inputs:color.connect = 292 | bool inputs:hasPremultipliedAlpha 293 | float inputs:opacity.connect = 294 | float inputs:opacityThreshold 295 | token outputs:out 296 | float2 ui:nodegraph:node:pos = (115.345184, 117.26764) 297 | int ui:nodegraph:node:stackingOrder = 421 298 | } 299 | } 300 | } 301 | 302 | -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Ex06.usda: -------------------------------------------------------------------------------- 1 | #usda 1.0 2 | ( 3 | customLayerData = { 4 | string creator = "Reality Composer Pro Version 2.0 (448.0.16.0.3)" 5 | } 6 | defaultPrim = "Root" 7 | metersPerUnit = 1 8 | upAxis = "Y" 9 | ) 10 | 11 | def Xform "Root" 12 | { 13 | reorder nameChildren = ["plane1mx1m", "StereoMaterial"] 14 | def "plane1mx1m" ( 15 | active = true 16 | customData = { 17 | float3 rotationEulerHint = (1.5707963, 0, 0) 18 | } 19 | references = @Models/plane1mx1m.usdz@ 20 | ) 21 | { 22 | quatf xformOp:orient = (0.70710677, 0.7071067, 0, 0) 23 | float3 xformOp:scale = (1, 1, 1) 24 | uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"] 25 | 26 | over "Geom" 27 | { 28 | over "Plane" ( 29 | prepend apiSchemas = ["MaterialBindingAPI"] 30 | ) 31 | { 32 | rel material:binding = ( 33 | bindMaterialAs = "weakerThanDescendants" 34 | ) 35 | } 36 | } 37 | } 38 | 39 | def Material "StereoMaterial" 40 | { 41 | token outputs:mtlx:surface.connect = 42 | token outputs:realitykit:vertex 43 | float2 ui:nodegraph:realitykit:subgraphOutputs:pos = (857.5441, 180.27998) 44 | int ui:nodegraph:realitykit:subgraphOutputs:stackingOrder = 731 45 | 46 | def Shader "CameraIndexSwitch" 47 | { 48 | uniform token info:id = "ND_realitykit_geometry_switch_cameraindex_color3" 49 | color3f inputs:left.connect = 50 | color3f inputs:mono 51 | color3f inputs:right.connect = 52 | color3f outputs:out 53 | float2 ui:nodegraph:node:pos = (167.79343, 15.282708) 54 | int ui:nodegraph:node:stackingOrder = 765 55 | } 56 | 57 | def Shader "Image_5" 58 | { 59 | uniform token info:id = "ND_image_float" 60 | asset inputs:file = @Textures/girlgray.jpg@ 61 | string inputs:filtertype 62 | float outputs:out 63 | float2 ui:nodegraph:node:pos = (-877.0457, -16.672215) 64 | int ui:nodegraph:node:stackingOrder = 759 65 | } 66 | 67 | def Shader "Subtract" 68 | { 69 | uniform token info:id = "ND_subtract_float" 70 | float inputs:in1.connect = 71 | float inputs:in2.connect = 72 | float outputs:out 73 | float2 ui:nodegraph:node:pos = (-525.9245, -82.940636) 74 | int ui:nodegraph:node:stackingOrder = 755 75 | } 76 | 77 | def Shader "Combine2" 78 | { 79 | uniform token info:id = "ND_combine2_vector2" 80 | float inputs:in1.connect = 81 | float inputs:in2.connect = 82 | float2 outputs:out 83 | float2 ui:nodegraph:node:pos = (-379.72015, 382.25128) 84 | int ui:nodegraph:node:stackingOrder = 743 85 | } 86 | 87 | def Shader "UnlitSurface" 88 | { 89 | uniform token info:id = "ND_realitykit_unlit_surfaceshader" 90 | bool inputs:applyPostProcessToneMap 91 | color3f inputs:color.connect = 92 | bool inputs:hasPremultipliedAlpha 93 | float inputs:opacity 94 | float inputs:opacityThreshold 95 | token outputs:out 96 | float2 ui:nodegraph:node:pos = (638.92126, 176.182) 97 | int ui:nodegraph:node:stackingOrder = 726 98 | } 99 | 100 | def Shader "Image" 101 | { 102 | uniform token info:id = "ND_image_color3" 103 | color3f inputs:default 104 | asset inputs:file = @Textures/girl.png@ 105 | string inputs:filtertype 106 | float2 inputs:texcoord.connect = 107 | string inputs:uaddressmode 108 | string inputs:vaddressmode 109 | color3f outputs:out 110 | float2 ui:nodegraph:node:pos = (-180.6259, -144.22684) 111 | int ui:nodegraph:node:stackingOrder = 728 112 | } 113 | 114 | def Shader "Separate2" 115 | { 116 | uniform token info:id = "ND_separate2_vector2" 117 | float2 inputs:in.connect = 118 | float outputs:outx 119 | float outputs:outy 120 | float2 ui:nodegraph:node:pos = (-829.40704, 259.11142) 121 | int ui:nodegraph:node:stackingOrder = 761 122 | } 123 | 124 | def Shader "TextureCoordinates" 125 | { 126 | uniform token info:id = "ND_texcoord_vector2" 127 | float2 outputs:out 128 | float2 ui:nodegraph:node:pos = (-1029.225, 233.73282) 129 | int ui:nodegraph:node:stackingOrder = 763 130 | } 131 | 132 | def Shader "Image_2" 133 | { 134 | uniform token info:id = "ND_image_color3" 135 | color3f inputs:default 136 | asset inputs:file = @Textures/girl.png@ 137 | string inputs:filtertype 138 | float2 inputs:texcoord.connect = 139 | string inputs:uaddressmode 140 | string inputs:vaddressmode 141 | color3f outputs:out 142 | float2 ui:nodegraph:node:pos = (-176.55495, 277.84894) 143 | int ui:nodegraph:node:stackingOrder = 729 144 | } 145 | 146 | def Shader "Add_1" 147 | { 148 | uniform token info:id = "ND_add_float" 149 | float inputs:in1.connect = 150 | float inputs:in2.connect = 151 | float outputs:out 152 | float2 ui:nodegraph:node:pos = (-513.58325, 325.42828) 153 | int ui:nodegraph:node:stackingOrder = 753 154 | } 155 | 156 | def Shader "Combine2_1" 157 | { 158 | uniform token info:id = "ND_combine2_vector2" 159 | float inputs:in1.connect = 160 | float inputs:in2.connect = 161 | float2 outputs:out 162 | float2 ui:nodegraph:node:pos = (-385.77664, -37.38329) 163 | int ui:nodegraph:node:stackingOrder = 745 164 | } 165 | 166 | def Shader "AdditiveMix" 167 | { 168 | uniform token info:id = "ND_plus_color3" 169 | color3f inputs:bg.connect = 170 | color3f inputs:fg.connect = 171 | float inputs:mix 172 | color3f outputs:out 173 | float2 ui:nodegraph:node:pos = (425.87164, 320.83157) 174 | int ui:nodegraph:node:stackingOrder = 771 175 | } 176 | 177 | def Shader "Multiply_1" 178 | { 179 | uniform token info:id = "ND_multiply_float" 180 | float inputs:in1.connect = 181 | float inputs:in2 = 0.02 182 | float outputs:out 183 | float2 ui:nodegraph:node:pos = (-629.3504, 201.94196) 184 | int ui:nodegraph:node:stackingOrder = 757 185 | } 186 | 187 | def Shader "Separate3" 188 | { 189 | uniform token info:id = "ND_separate3_color3" 190 | color3f inputs:in.connect = 191 | float outputs:outg 192 | float outputs:outr 193 | float2 ui:nodegraph:node:pos = (29.886606, -172.68163) 194 | int ui:nodegraph:node:stackingOrder = 730 195 | } 196 | 197 | def Shader "Combine3" 198 | { 199 | uniform token info:id = "ND_combine3_color3" 200 | float inputs:in1.connect = 201 | color3f outputs:out 202 | float2 ui:nodegraph:node:pos = (210.36246, -173.17097) 203 | int ui:nodegraph:node:stackingOrder = 734 204 | } 205 | 206 | def Shader "Separate3_1" 207 | { 208 | uniform token info:id = "ND_separate3_color3" 209 | color3f inputs:in.connect = 210 | float outputs:outb 211 | float outputs:outg 212 | float outputs:outr 213 | float2 ui:nodegraph:node:pos = (57.20687, 452.70245) 214 | int ui:nodegraph:node:stackingOrder = 767 215 | } 216 | 217 | def Shader "Combine3_1" 218 | { 219 | uniform token info:id = "ND_combine3_color3" 220 | float inputs:in1.connect = None 221 | float inputs:in2.connect = 222 | float inputs:in3.connect = 223 | color3f outputs:out 224 | float2 ui:nodegraph:node:pos = (240.52716, 450.34738) 225 | int ui:nodegraph:node:stackingOrder = 769 226 | } 227 | } 228 | } 229 | 230 | -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/frame1x0_5m.usdz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/frame1x0_5m.usdz -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/jewel.usdz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/jewel.usdz -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/jewel1.usdz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/jewel1.usdz -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/plane1mx0_5m.usdz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/plane1mx0_5m.usdz -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/plane1mx1m.usdz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/plane1mx1m.usdz -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/warphole.usdz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Models/warphole.usdz -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/ParticleEmitterPresetTextures/flare.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/ParticleEmitterPresetTextures/flare.exr -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/ParticleEmitterPresetTextures/twinkle.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/ParticleEmitterPresetTextures/twinkle.exr -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/girl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/girl.jpg -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/girl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/girl.png -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/girlgray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/girlgray.jpg -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/masume1024_001S.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/masume1024_001S.png -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/nebula_volume.ktx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/nebula_volume.ktx -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/roomtexture2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/Textures/roomtexture2.png -------------------------------------------------------------------------------- /Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Bundle for the RealityKitContent project 4 | public let realityKitContentBundle = Bundle.module 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ShaderGraph by Examples in visionOS 2 | 3 | 4 | 5 | This project shows examples of ShaderGraph in visionOS 2. 6 | 7 | - GitHub : https://github.com/ynagatomo/ShaderGraphByExamples 8 | - Xcode 16.1+ , visionOS 2.1+ 9 | - Some examples only work with a real Apple Vision Pro device. 10 | 11 | ## ShaderGraph Examples 12 | 13 | | | Example | Name | Description | 14 | | --- | --- | --- | --- | 15 | | | Ex01 | Interior Mapping | Calculating the intersection of the line of sight and the wall and draw a space with pseudo depth. | 16 | | | Ex02 | Warp VFX | A procedural warp effect shader. You can change the movement, color, and pattern by changing the node's parameters. | 17 | | | Ex03 | Jewel | A very simple Jewel shader with the Environment Radiance Node. | 18 | | | Ex04 | Nebula 3D | A nebula with a 3D texture consisting of six 2D texture slices. | 19 | | | Ex05 | Transition Depth | A transition with a depth-map. | 20 | | | Ex06 | Stereoscopic Depth |Stereoscopic display with a depth-map. Apple Vision Pro is required to see. | 21 | 22 | ### 3D Texture Image File: KTX 23 | 24 | An example of how to create a 3d texture image file, '.ktx', with Blender and Apple TextureConverter. 25 | 26 | 1. Render image slices of a volumetric 3d scene. 27 | 2. Convert them to a ktx file with Apple TextureConverter using '--build_volume' option. 28 | 3. Use the ktx texture file with the Image3D shader-graph node. 29 | 30 | 31 | 32 | ### Depth-map 33 | 34 | There are many ways to create depth-map textures, for example, using the Apple Depth Pro. 35 | 36 | apple/ml-depth-pro: Sharp Monocular Metric Depth in Less Than a Second, 37 | a foundation model for zero-shot metric monocular depth estimation. 38 | 39 | GitHub: https://github.com/apple/ml-depth-pro 40 | 41 | Depth Pro CLI: `% depth-pro-run -i mydata/girl.png -o results --skip-display` 42 | 43 | 44 | 45 | Modify Apple Depth-Pro's python code to save grayscale depth-map; 46 | 47 | ml-depth-pro/src/depth_pro/cli/run.py: 48 | 49 | `90 cmap = plt.get_cmap("binary") # for grayscale depth map` 50 | 51 | 52 | 53 | ### Stereoscopic rendering with Blender 54 | 55 | To create side-by-side images for stereoscopic display on Apple Vision Pro, 56 | you can use Blender like below. 57 | 58 | 59 | 60 | 61 | ## References 62 | 63 | - Sample Code: ShaderGraph Examples in visionOS 1.2 [GitHub: ynagatomo/SGMExamples](https://github.com/ynagatomo/SGMExamples) 64 | - Documentation: ShaderGraph Nodes in RealityKit [GitHub: ynagatomo](https://github.com/ynagatomo/evolution-Metal-ARKit-RealityKit-sheet#shadergraph-nodes-in-realitykit) 65 | - Article: ShaderGraph in visionOS (Jan 6, 2024) [Medium: ynagatomo](https://levelup.gitconnected.com/shadergraph-in-visionos-45598e49626c) 66 | 67 | ## Change logs 68 | 69 |
70 | click to open 71 | 72 | 1. [Nov 3, 2024] Added the Ex01, "Interior Mapping Shader" 73 | 1. [Nov 17, 2024] Added the Ex04, Ex05, Ex06, "Nebura with a 3D texture" 74 | 75 |
76 | 77 | ## License 78 | 79 | MIT License 80 | 81 | since Nov, 2024 82 | -------------------------------------------------------------------------------- /ShaderGraphByExamples.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 77; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BA0B234D2CA8D2C700A20E3C /* RealityKitContent in Frameworks */ = {isa = PBXBuildFile; productRef = BA0B234C2CA8D2C700A20E3C /* RealityKitContent */; }; 11 | BA0B236F2CA8D59800A20E3C /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BA0B23652CA8D59800A20E3C /* Preview Assets.xcassets */; }; 12 | BA0B23702CA8D59800A20E3C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BA0B23682CA8D59800A20E3C /* Assets.xcassets */; }; 13 | BA0B23722CA8D59800A20E3C /* AppModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA0B23672CA8D59800A20E3C /* AppModel.swift */; }; 14 | BA0B23732CA8D59800A20E3C /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA0B23692CA8D59800A20E3C /* ContentView.swift */; }; 15 | BA0B23742CA8D59800A20E3C /* ImmersiveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA0B236A2CA8D59800A20E3C /* ImmersiveView.swift */; }; 16 | BA0B23752CA8D59800A20E3C /* ShaderGraphByExamplesApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA0B236C2CA8D59800A20E3C /* ShaderGraphByExamplesApp.swift */; }; 17 | BA0B237D2CA8D73000A20E3C /* Logger+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA0B237C2CA8D73000A20E3C /* Logger+Extensions.swift */; }; 18 | BA224F332CD7798C008E05E6 /* ExampleList.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA224F322CD7798C008E05E6 /* ExampleList.swift */; }; 19 | BA224F352CD77B4B008E05E6 /* AppConstant.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA224F342CD77B4B008E05E6 /* AppConstant.swift */; }; 20 | BA224F372CD791F9008E05E6 /* ExampleItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA224F362CD791F9008E05E6 /* ExampleItem.swift */; }; 21 | BA224F392CD79202008E05E6 /* ExampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA224F382CD79202008E05E6 /* ExampleView.swift */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXFileReference section */ 25 | BA0B23472CA8D2C700A20E3C /* ShaderGraphByExamples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ShaderGraphByExamples.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | BA0B234B2CA8D2C700A20E3C /* RealityKitContent */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = RealityKitContent; sourceTree = ""; }; 27 | BA0B23652CA8D59800A20E3C /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 28 | BA0B23672CA8D59800A20E3C /* AppModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppModel.swift; sourceTree = ""; }; 29 | BA0B23682CA8D59800A20E3C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 30 | BA0B23692CA8D59800A20E3C /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 31 | BA0B236A2CA8D59800A20E3C /* ImmersiveView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImmersiveView.swift; sourceTree = ""; }; 32 | BA0B236B2CA8D59800A20E3C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | BA0B236C2CA8D59800A20E3C /* ShaderGraphByExamplesApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShaderGraphByExamplesApp.swift; sourceTree = ""; }; 34 | BA0B237C2CA8D73000A20E3C /* Logger+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Logger+Extensions.swift"; sourceTree = ""; }; 35 | BA0B237E2CA8D81700A20E3C /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 36 | BA224F322CD7798C008E05E6 /* ExampleList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleList.swift; sourceTree = ""; }; 37 | BA224F342CD77B4B008E05E6 /* AppConstant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppConstant.swift; sourceTree = ""; }; 38 | BA224F362CD791F9008E05E6 /* ExampleItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleItem.swift; sourceTree = ""; }; 39 | BA224F382CD79202008E05E6 /* ExampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleView.swift; sourceTree = ""; }; 40 | /* End PBXFileReference section */ 41 | 42 | /* Begin PBXFrameworksBuildPhase section */ 43 | BA0B23442CA8D2C700A20E3C /* Frameworks */ = { 44 | isa = PBXFrameworksBuildPhase; 45 | buildActionMask = 2147483647; 46 | files = ( 47 | BA0B234D2CA8D2C700A20E3C /* RealityKitContent in Frameworks */, 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | /* End PBXFrameworksBuildPhase section */ 52 | 53 | /* Begin PBXGroup section */ 54 | BA0B233E2CA8D2C700A20E3C = { 55 | isa = PBXGroup; 56 | children = ( 57 | BA0B237E2CA8D81700A20E3C /* README.md */, 58 | BA0B236E2CA8D59800A20E3C /* ShaderGraphByExamples */, 59 | BA0B234A2CA8D2C700A20E3C /* Packages */, 60 | BA0B23482CA8D2C700A20E3C /* Products */, 61 | ); 62 | sourceTree = ""; 63 | }; 64 | BA0B23482CA8D2C700A20E3C /* Products */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | BA0B23472CA8D2C700A20E3C /* ShaderGraphByExamples.app */, 68 | ); 69 | name = Products; 70 | sourceTree = ""; 71 | }; 72 | BA0B234A2CA8D2C700A20E3C /* Packages */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | BA0B234B2CA8D2C700A20E3C /* RealityKitContent */, 76 | ); 77 | path = Packages; 78 | sourceTree = ""; 79 | }; 80 | BA0B23662CA8D59800A20E3C /* Preview Content */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | BA0B23652CA8D59800A20E3C /* Preview Assets.xcassets */, 84 | ); 85 | path = "Preview Content"; 86 | sourceTree = ""; 87 | }; 88 | BA0B236E2CA8D59800A20E3C /* ShaderGraphByExamples */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | BA0B23772CA8D6C300A20E3C /* App */, 92 | BA0B23782CA8D6C900A20E3C /* AppModel */, 93 | BA0B23792CA8D6D100A20E3C /* Views */, 94 | BA0B237A2CA8D6FB00A20E3C /* Utilities */, 95 | BA0B23682CA8D59800A20E3C /* Assets.xcassets */, 96 | BA0B236B2CA8D59800A20E3C /* Info.plist */, 97 | BA0B23662CA8D59800A20E3C /* Preview Content */, 98 | ); 99 | path = ShaderGraphByExamples; 100 | sourceTree = ""; 101 | }; 102 | BA0B23772CA8D6C300A20E3C /* App */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | BA0B236C2CA8D59800A20E3C /* ShaderGraphByExamplesApp.swift */, 106 | BA224F322CD7798C008E05E6 /* ExampleList.swift */, 107 | BA224F342CD77B4B008E05E6 /* AppConstant.swift */, 108 | ); 109 | path = App; 110 | sourceTree = ""; 111 | }; 112 | BA0B23782CA8D6C900A20E3C /* AppModel */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | BA0B23672CA8D59800A20E3C /* AppModel.swift */, 116 | ); 117 | path = AppModel; 118 | sourceTree = ""; 119 | }; 120 | BA0B23792CA8D6D100A20E3C /* Views */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | BA0B23692CA8D59800A20E3C /* ContentView.swift */, 124 | BA224F382CD79202008E05E6 /* ExampleView.swift */, 125 | BA224F362CD791F9008E05E6 /* ExampleItem.swift */, 126 | BA0B236A2CA8D59800A20E3C /* ImmersiveView.swift */, 127 | ); 128 | path = Views; 129 | sourceTree = ""; 130 | }; 131 | BA0B237A2CA8D6FB00A20E3C /* Utilities */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | BA0B237B2CA8D70D00A20E3C /* Logger */, 135 | ); 136 | path = Utilities; 137 | sourceTree = ""; 138 | }; 139 | BA0B237B2CA8D70D00A20E3C /* Logger */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | BA0B237C2CA8D73000A20E3C /* Logger+Extensions.swift */, 143 | ); 144 | path = Logger; 145 | sourceTree = ""; 146 | }; 147 | /* End PBXGroup section */ 148 | 149 | /* Begin PBXNativeTarget section */ 150 | BA0B23462CA8D2C700A20E3C /* ShaderGraphByExamples */ = { 151 | isa = PBXNativeTarget; 152 | buildConfigurationList = BA0B235F2CA8D2C800A20E3C /* Build configuration list for PBXNativeTarget "ShaderGraphByExamples" */; 153 | buildPhases = ( 154 | BA0B23432CA8D2C700A20E3C /* Sources */, 155 | BA0B23442CA8D2C700A20E3C /* Frameworks */, 156 | BA0B23452CA8D2C700A20E3C /* Resources */, 157 | BA0B23642CA8D4EA00A20E3C /* ShellScript */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = ShaderGraphByExamples; 164 | packageProductDependencies = ( 165 | BA0B234C2CA8D2C700A20E3C /* RealityKitContent */, 166 | ); 167 | productName = ShaderGraphByExamples; 168 | productReference = BA0B23472CA8D2C700A20E3C /* ShaderGraphByExamples.app */; 169 | productType = "com.apple.product-type.application"; 170 | }; 171 | /* End PBXNativeTarget section */ 172 | 173 | /* Begin PBXProject section */ 174 | BA0B233F2CA8D2C700A20E3C /* Project object */ = { 175 | isa = PBXProject; 176 | attributes = { 177 | BuildIndependentTargetsInParallel = 1; 178 | LastSwiftUpdateCheck = 1610; 179 | LastUpgradeCheck = 1610; 180 | TargetAttributes = { 181 | BA0B23462CA8D2C700A20E3C = { 182 | CreatedOnToolsVersion = 16.1; 183 | }; 184 | }; 185 | }; 186 | buildConfigurationList = BA0B23422CA8D2C700A20E3C /* Build configuration list for PBXProject "ShaderGraphByExamples" */; 187 | developmentRegion = en; 188 | hasScannedForEncodings = 0; 189 | knownRegions = ( 190 | en, 191 | Base, 192 | ); 193 | mainGroup = BA0B233E2CA8D2C700A20E3C; 194 | minimizedProjectReferenceProxies = 1; 195 | preferredProjectObjectVersion = 77; 196 | productRefGroup = BA0B23482CA8D2C700A20E3C /* Products */; 197 | projectDirPath = ""; 198 | projectRoot = ""; 199 | targets = ( 200 | BA0B23462CA8D2C700A20E3C /* ShaderGraphByExamples */, 201 | ); 202 | }; 203 | /* End PBXProject section */ 204 | 205 | /* Begin PBXResourcesBuildPhase section */ 206 | BA0B23452CA8D2C700A20E3C /* Resources */ = { 207 | isa = PBXResourcesBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | BA0B236F2CA8D59800A20E3C /* Preview Assets.xcassets in Resources */, 211 | BA0B23702CA8D59800A20E3C /* Assets.xcassets in Resources */, 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | }; 215 | /* End PBXResourcesBuildPhase section */ 216 | 217 | /* Begin PBXShellScriptBuildPhase section */ 218 | BA0B23642CA8D4EA00A20E3C /* ShellScript */ = { 219 | isa = PBXShellScriptBuildPhase; 220 | alwaysOutOfDate = 1; 221 | buildActionMask = 2147483647; 222 | files = ( 223 | ); 224 | inputFileListPaths = ( 225 | ); 226 | inputPaths = ( 227 | ); 228 | outputFileListPaths = ( 229 | ); 230 | outputPaths = ( 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | shellPath = /bin/sh; 234 | shellScript = "# Adds support for Apple Silicon brew directory\nexport PATH=\"$PATH:/opt/homebrew/bin\"\n\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed.\"\nfi\n"; 235 | }; 236 | /* End PBXShellScriptBuildPhase section */ 237 | 238 | /* Begin PBXSourcesBuildPhase section */ 239 | BA0B23432CA8D2C700A20E3C /* Sources */ = { 240 | isa = PBXSourcesBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | BA224F372CD791F9008E05E6 /* ExampleItem.swift in Sources */, 244 | BA224F332CD7798C008E05E6 /* ExampleList.swift in Sources */, 245 | BA0B23722CA8D59800A20E3C /* AppModel.swift in Sources */, 246 | BA0B23732CA8D59800A20E3C /* ContentView.swift in Sources */, 247 | BA224F352CD77B4B008E05E6 /* AppConstant.swift in Sources */, 248 | BA0B23742CA8D59800A20E3C /* ImmersiveView.swift in Sources */, 249 | BA0B237D2CA8D73000A20E3C /* Logger+Extensions.swift in Sources */, 250 | BA0B23752CA8D59800A20E3C /* ShaderGraphByExamplesApp.swift in Sources */, 251 | BA224F392CD79202008E05E6 /* ExampleView.swift in Sources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | /* End PBXSourcesBuildPhase section */ 256 | 257 | /* Begin XCBuildConfiguration section */ 258 | BA0B23602CA8D2C800A20E3C /* Debug */ = { 259 | isa = XCBuildConfiguration; 260 | buildSettings = { 261 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 262 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 263 | CODE_SIGN_STYLE = Automatic; 264 | CURRENT_PROJECT_VERSION = 1; 265 | DEVELOPMENT_ASSET_PATHS = "\"ShaderGraphByExamples/Preview Content\""; 266 | DEVELOPMENT_TEAM = J5CY9Q9UP5; 267 | ENABLE_PREVIEWS = YES; 268 | ENABLE_USER_SCRIPT_SANDBOXING = NO; 269 | GENERATE_INFOPLIST_FILE = YES; 270 | INFOPLIST_FILE = "$(TARGET_NAME)/Info.plist"; 271 | INFOPLIST_KEY_CFBundleDisplayName = "ShaderGraph by Examples"; 272 | LD_RUNPATH_SEARCH_PATHS = ( 273 | "$(inherited)", 274 | "@executable_path/Frameworks", 275 | ); 276 | MARKETING_VERSION = 0.1; 277 | PRODUCT_BUNDLE_IDENTIFIER = com.atarayosd.ShaderGraphByExamples; 278 | PRODUCT_NAME = "$(TARGET_NAME)"; 279 | SUPPORTED_PLATFORMS = "xros xrsimulator"; 280 | SWIFT_EMIT_LOC_STRINGS = YES; 281 | SWIFT_STRICT_CONCURRENCY = complete; 282 | SWIFT_VERSION = 6.0; 283 | TARGETED_DEVICE_FAMILY = 7; 284 | }; 285 | name = Debug; 286 | }; 287 | BA0B23612CA8D2C800A20E3C /* Release */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 291 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 292 | CODE_SIGN_STYLE = Automatic; 293 | CURRENT_PROJECT_VERSION = 1; 294 | DEVELOPMENT_ASSET_PATHS = "\"ShaderGraphByExamples/Preview Content\""; 295 | DEVELOPMENT_TEAM = J5CY9Q9UP5; 296 | ENABLE_PREVIEWS = YES; 297 | ENABLE_USER_SCRIPT_SANDBOXING = NO; 298 | GENERATE_INFOPLIST_FILE = YES; 299 | INFOPLIST_FILE = "$(TARGET_NAME)/Info.plist"; 300 | INFOPLIST_KEY_CFBundleDisplayName = "ShaderGraph by Examples"; 301 | LD_RUNPATH_SEARCH_PATHS = ( 302 | "$(inherited)", 303 | "@executable_path/Frameworks", 304 | ); 305 | MARKETING_VERSION = 0.1; 306 | PRODUCT_BUNDLE_IDENTIFIER = com.atarayosd.ShaderGraphByExamples; 307 | PRODUCT_NAME = "$(TARGET_NAME)"; 308 | SUPPORTED_PLATFORMS = "xros xrsimulator"; 309 | SWIFT_EMIT_LOC_STRINGS = YES; 310 | SWIFT_STRICT_CONCURRENCY = complete; 311 | SWIFT_VERSION = 6.0; 312 | TARGETED_DEVICE_FAMILY = 7; 313 | }; 314 | name = Release; 315 | }; 316 | BA0B23622CA8D2C800A20E3C /* Debug */ = { 317 | isa = XCBuildConfiguration; 318 | buildSettings = { 319 | ALWAYS_SEARCH_USER_PATHS = NO; 320 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 321 | CLANG_ANALYZER_NONNULL = YES; 322 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 324 | CLANG_ENABLE_MODULES = YES; 325 | CLANG_ENABLE_OBJC_ARC = YES; 326 | CLANG_ENABLE_OBJC_WEAK = YES; 327 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 328 | CLANG_WARN_BOOL_CONVERSION = YES; 329 | CLANG_WARN_COMMA = YES; 330 | CLANG_WARN_CONSTANT_CONVERSION = YES; 331 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 334 | CLANG_WARN_EMPTY_BODY = YES; 335 | CLANG_WARN_ENUM_CONVERSION = YES; 336 | CLANG_WARN_INFINITE_RECURSION = YES; 337 | CLANG_WARN_INT_CONVERSION = YES; 338 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 339 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 340 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 342 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 343 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 344 | CLANG_WARN_STRICT_PROTOTYPES = YES; 345 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 346 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 347 | CLANG_WARN_UNREACHABLE_CODE = YES; 348 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 349 | COPY_PHASE_STRIP = NO; 350 | DEBUG_INFORMATION_FORMAT = dwarf; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | ENABLE_TESTABILITY = YES; 353 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 354 | GCC_C_LANGUAGE_STANDARD = gnu17; 355 | GCC_DYNAMIC_NO_PIC = NO; 356 | GCC_NO_COMMON_BLOCKS = YES; 357 | GCC_OPTIMIZATION_LEVEL = 0; 358 | GCC_PREPROCESSOR_DEFINITIONS = ( 359 | "DEBUG=1", 360 | "$(inherited)", 361 | ); 362 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 363 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 364 | GCC_WARN_UNDECLARED_SELECTOR = YES; 365 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 366 | GCC_WARN_UNUSED_FUNCTION = YES; 367 | GCC_WARN_UNUSED_VARIABLE = YES; 368 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 369 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 370 | MTL_FAST_MATH = YES; 371 | ONLY_ACTIVE_ARCH = YES; 372 | SDKROOT = xros; 373 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 374 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 375 | XROS_DEPLOYMENT_TARGET = 2.1; 376 | }; 377 | name = Debug; 378 | }; 379 | BA0B23632CA8D2C800A20E3C /* Release */ = { 380 | isa = XCBuildConfiguration; 381 | buildSettings = { 382 | ALWAYS_SEARCH_USER_PATHS = NO; 383 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 384 | CLANG_ANALYZER_NONNULL = YES; 385 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 386 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 387 | CLANG_ENABLE_MODULES = YES; 388 | CLANG_ENABLE_OBJC_ARC = YES; 389 | CLANG_ENABLE_OBJC_WEAK = YES; 390 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 391 | CLANG_WARN_BOOL_CONVERSION = YES; 392 | CLANG_WARN_COMMA = YES; 393 | CLANG_WARN_CONSTANT_CONVERSION = YES; 394 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 395 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 396 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 397 | CLANG_WARN_EMPTY_BODY = YES; 398 | CLANG_WARN_ENUM_CONVERSION = YES; 399 | CLANG_WARN_INFINITE_RECURSION = YES; 400 | CLANG_WARN_INT_CONVERSION = YES; 401 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 402 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 403 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 404 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 405 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 406 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 407 | CLANG_WARN_STRICT_PROTOTYPES = YES; 408 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 409 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 410 | CLANG_WARN_UNREACHABLE_CODE = YES; 411 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 412 | COPY_PHASE_STRIP = NO; 413 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 414 | ENABLE_NS_ASSERTIONS = NO; 415 | ENABLE_STRICT_OBJC_MSGSEND = YES; 416 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 417 | GCC_C_LANGUAGE_STANDARD = gnu17; 418 | GCC_NO_COMMON_BLOCKS = YES; 419 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 420 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 421 | GCC_WARN_UNDECLARED_SELECTOR = YES; 422 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 423 | GCC_WARN_UNUSED_FUNCTION = YES; 424 | GCC_WARN_UNUSED_VARIABLE = YES; 425 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 426 | MTL_ENABLE_DEBUG_INFO = NO; 427 | MTL_FAST_MATH = YES; 428 | SDKROOT = xros; 429 | SWIFT_COMPILATION_MODE = wholemodule; 430 | VALIDATE_PRODUCT = YES; 431 | XROS_DEPLOYMENT_TARGET = 2.1; 432 | }; 433 | name = Release; 434 | }; 435 | /* End XCBuildConfiguration section */ 436 | 437 | /* Begin XCConfigurationList section */ 438 | BA0B23422CA8D2C700A20E3C /* Build configuration list for PBXProject "ShaderGraphByExamples" */ = { 439 | isa = XCConfigurationList; 440 | buildConfigurations = ( 441 | BA0B23622CA8D2C800A20E3C /* Debug */, 442 | BA0B23632CA8D2C800A20E3C /* Release */, 443 | ); 444 | defaultConfigurationIsVisible = 0; 445 | defaultConfigurationName = Release; 446 | }; 447 | BA0B235F2CA8D2C800A20E3C /* Build configuration list for PBXNativeTarget "ShaderGraphByExamples" */ = { 448 | isa = XCConfigurationList; 449 | buildConfigurations = ( 450 | BA0B23602CA8D2C800A20E3C /* Debug */, 451 | BA0B23612CA8D2C800A20E3C /* Release */, 452 | ); 453 | defaultConfigurationIsVisible = 0; 454 | defaultConfigurationName = Release; 455 | }; 456 | /* End XCConfigurationList section */ 457 | 458 | /* Begin XCSwiftPackageProductDependency section */ 459 | BA0B234C2CA8D2C700A20E3C /* RealityKitContent */ = { 460 | isa = XCSwiftPackageProductDependency; 461 | productName = RealityKitContent; 462 | }; 463 | /* End XCSwiftPackageProductDependency section */ 464 | }; 465 | rootObject = BA0B233F2CA8D2C700A20E3C /* Project object */; 466 | } 467 | -------------------------------------------------------------------------------- /ShaderGraphByExamples.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/App/AppConstant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppConstant.swift 3 | // ShaderGraphByExamples 4 | // 5 | // Created by Yasuhito Nagatomo on 2024/11/03. 6 | // 7 | 8 | import Foundation 9 | 10 | enum AppConstant { 11 | static let rootPosition = SIMD3(0, 1.5, -1.5) 12 | } 13 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/App/ExampleList.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleList.swift 3 | // ShaderGraphByExamples 4 | // 5 | // Created by Yasuhito Nagatomo on 2024/11/03. 6 | // 7 | 8 | import Foundation 9 | 10 | struct Example: Identifiable, Codable, Hashable { 11 | var id = UUID() 12 | let name: String 13 | let thumbnail: String 14 | let sceneName: String // Scene name in the RealityKitContent 15 | let description: [String] 16 | let dragable: Bool 17 | } 18 | 19 | enum ExampleList { 20 | static let examples: [Example] = [ 21 | // [Ex01: Interior Mapping] 22 | Example(name: "Interior Mapping", 23 | thumbnail: "ex01", 24 | sceneName: "Ex01", 25 | description: [ 26 | "Calculating the intersection of the line of sight and the wall and draw a space with pseudo depth." 27 | ], 28 | dragable: false), 29 | // [Ex02: Warp VFX] 30 | Example(name: "Warp VFX", 31 | thumbnail: "ex02", 32 | sceneName: "Ex02", 33 | description: [ 34 | // swiftlint:disable:next line_length 35 | "A procedural warp effect shader. You can change the movement, color, and pattern by changing the node's parameters." 36 | ], 37 | dragable: false), 38 | // [Ex03: Jewel] 39 | Example(name: "Jewel", 40 | thumbnail: "ex03", 41 | sceneName: "Ex03", 42 | description: [ 43 | "A very simple Jewel shader with the Environment Radiance Node." 44 | ], 45 | dragable: false), 46 | // [Ex04: Nebula with a 3D texture] 47 | Example(name: "Nebula 3D", 48 | thumbnail: "ex04", 49 | sceneName: "Ex04", 50 | description: [ 51 | "A nebula with a 3D texture consisting of six 2D texture slices." 52 | ], 53 | dragable: true), 54 | // [Ex05: Transition with a Depth-map] 55 | Example(name: "Transition Depth", 56 | thumbnail: "ex05", 57 | sceneName: "Ex05", 58 | description: [ 59 | "A transition with a depth-map." 60 | ], 61 | dragable: true), 62 | // [Ex06: Stereo with a Depth-map] 63 | Example(name: "Stereoscopic Depth", 64 | thumbnail: "ex06", 65 | sceneName: "Ex06", 66 | description: [ 67 | "Stereoscopic display with a depth-map. Apple Vision Pro is required to see." 68 | ], 69 | dragable: true) 70 | ] 71 | } 72 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/App/ShaderGraphByExamplesApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ShaderGraphByExamplesApp.swift 3 | // ShaderGraphByExamples 4 | // 5 | // Created by Yasuhito Nagatomo on 2024/09/29. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct ShaderGraphByExamplesApp: App { 12 | 13 | @State private var appModel = AppModel() 14 | 15 | var body: some Scene { 16 | WindowGroup { 17 | ContentView() 18 | .environment(appModel) 19 | .frame(width: 900, height: 600) 20 | } 21 | .windowStyle(.plain) 22 | .windowResizability(.contentSize) 23 | 24 | ImmersiveSpace(id: appModel.immersiveSpaceID, for: Example.self) { example in 25 | ImmersiveView(example: example) 26 | .environment(appModel) 27 | .onAppear { 28 | appModel.immersiveSpaceState = .open 29 | } 30 | .onDisappear { 31 | appModel.immersiveSpaceState = .closed 32 | } 33 | } 34 | .immersionStyle(selection: .constant(.mixed), in: .mixed) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/AppModel/AppModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppModel.swift 3 | // ShaderGraphByExamples 4 | // 5 | // Created by Yasuhito Nagatomo on 2024/09/29. 6 | // 7 | 8 | import SwiftUI 9 | 10 | /// Maintains app-wide state 11 | @MainActor 12 | @Observable 13 | class AppModel { 14 | let immersiveSpaceID = "ImmersiveSpace" 15 | enum ImmersiveSpaceState { 16 | case closed 17 | case inTransition 18 | case open 19 | } 20 | var immersiveSpaceState = ImmersiveSpaceState.closed 21 | } 22 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "appicon_MB.png", 5 | "idiom" : "vision", 6 | "scale" : "2x" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/appicon_MB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/appicon_MB.png -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | }, 6 | "layers" : [ 7 | { 8 | "filename" : "Front.solidimagestacklayer" 9 | }, 10 | { 11 | "filename" : "Middle.solidimagestacklayer" 12 | }, 13 | { 14 | "filename" : "Back.solidimagestacklayer" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "appicon_F.png", 5 | "idiom" : "vision", 6 | "scale" : "2x" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/appicon_F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/appicon_F.png -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "appicon_MB.png", 5 | "idiom" : "vision", 6 | "scale" : "2x" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/appicon_MB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/appicon_MB.png -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex01.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ex01.heic", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex01.imageset/ex01.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/ShaderGraphByExamples/Assets.xcassets/ex01.imageset/ex01.heic -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex02.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ex02.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex02.imageset/ex02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/ShaderGraphByExamples/Assets.xcassets/ex02.imageset/ex02.png -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex03.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ex03.heic", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex03.imageset/ex03.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/ShaderGraphByExamples/Assets.xcassets/ex03.imageset/ex03.heic -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex04.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ex04.heic", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex04.imageset/ex04.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/ShaderGraphByExamples/Assets.xcassets/ex04.imageset/ex04.heic -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex05.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ex05.heic", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex05.imageset/ex05.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/ShaderGraphByExamples/Assets.xcassets/ex05.imageset/ex05.heic -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex06.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ex06.heic", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Assets.xcassets/ex06.imageset/ex06.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/ShaderGraphByExamples/Assets.xcassets/ex06.imageset/ex06.heic -------------------------------------------------------------------------------- /ShaderGraphByExamples/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationPreferredDefaultSceneSessionRole 8 | UIWindowSceneSessionRoleApplication 9 | UIApplicationSupportsMultipleScenes 10 | 11 | UISceneConfigurations 12 | 13 | UISceneSessionRoleImmersiveSpaceApplication 14 | 15 | 16 | UISceneInitialImmersionStyle 17 | UIImmersionStyleMixed 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Utilities/Logger/Logger+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Logger+Extensions.swift 3 | // ShaderGraphByExamples 4 | // 5 | // Created by Yasuhito Nagatomo on 2024/09/29. 6 | // 7 | 8 | import OSLog 9 | 10 | extension Logger { 11 | private static let subsystem = Bundle.main.bundleIdentifier! 12 | 13 | // @MainActor static let appRunning = Logger(subsystem: subsystem, category: "apprunning") 14 | // @MainActor static let statistics = Logger(subsystem: subsystem, category: "statistics") 15 | static let appRunning = Logger(subsystem: subsystem, category: "apprunning") 16 | static let statistics = Logger(subsystem: subsystem, category: "statistics") 17 | } 18 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Views/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // ShaderGraphByExamples 4 | // 5 | // Created by Yasuhito Nagatomo on 2024/09/29. 6 | // 7 | 8 | import SwiftUI 9 | import RealityKit 10 | // import RealityKitContent 11 | 12 | struct ContentView: View { 13 | @Environment(AppModel.self) private var appModel 14 | @Environment(\.dismissImmersiveSpace) private var dismissImmersiveSpace 15 | 16 | let columns = [ 17 | GridItem(.flexible()), 18 | GridItem(.flexible()), 19 | GridItem(.flexible()) 20 | ] 21 | 22 | var body: some View { 23 | VStack { 24 | HStack { 25 | Text("ShaderGraph By Examples") 26 | .font(.largeTitle) 27 | .padding(.horizontal, 20) 28 | Spacer() 29 | Button(action: { 30 | closeImmersiveSpace() 31 | }, label: { 32 | Text("Close the Immersive Space") 33 | }) // Button 34 | .background(appModel.immersiveSpaceState == .open 35 | ? Color.yellow : Color.clear) 36 | .cornerRadius(26) 37 | .padding(.horizontal, 20) 38 | .disabled(appModel.immersiveSpaceState != .open) 39 | } // HStack 40 | .padding() 41 | 42 | NavigationStack { 43 | ScrollView { 44 | LazyVGrid(columns: columns, spacing: 4) { 45 | ForEach(ExampleList.examples) { example in 46 | NavigationLink { 47 | ExampleView(example: example) 48 | } label: { 49 | ExampleItem(example: example) 50 | .contentShape(.hoverEffect, .rect(cornerRadius: 20)) 51 | .hoverEffect() 52 | } // NavigationLink 53 | } // ForEach 54 | } // LazyVGrid 55 | .padding() 56 | } // ScrollView 57 | } // NavigationStac 58 | } // VStack 59 | } 60 | 61 | private func closeImmersiveSpace() { 62 | guard appModel.immersiveSpaceState == .open else { return } 63 | 64 | Task { 65 | appModel.immersiveSpaceState = .inTransition 66 | await dismissImmersiveSpace() 67 | // Don't set immersiveSpaceState to .closed because there 68 | // are multiple paths to ImmersiveView.onDisappear(). 69 | // Only set .closed in ImmersiveView.onDisappear(). 70 | } 71 | } 72 | } 73 | 74 | #Preview(windowStyle: .automatic) { 75 | ContentView() 76 | .environment(AppModel()) 77 | } 78 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Views/ExampleItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleItem.swift 3 | // ShaderGraphByExamples 4 | // 5 | // Created by Yasuhito Nagatomo on 2024/11/03. 6 | // 7 | 8 | import UIKit 9 | import SwiftUI 10 | import RealityKit 11 | 12 | struct ExampleItem: View { 13 | let example: Example 14 | 15 | var body: some View { 16 | Image(example.thumbnail) 17 | .resizable() 18 | .scaledToFill() 19 | .frame(width: 280) 20 | .clipShape(RoundedRectangle(cornerRadius: 20)) 21 | .overlay(alignment: .bottomTrailing) { 22 | VStack { 23 | Text(example.name) 24 | .font(.title) 25 | Text("ShaderGraph: " + example.sceneName) 26 | .foregroundStyle(.secondary) 27 | ForEach(example.description, id: \.self) { description in 28 | Text(description) 29 | .font(.caption) 30 | .foregroundStyle(.secondary) 31 | } 32 | } // VStack 33 | .padding() 34 | } // overlay 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Views/ExampleView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleView.swift 3 | // ShaderGraphByExamples 4 | // 5 | // Created by Yasuhito Nagatomo on 2024/11/03. 6 | // 7 | 8 | import SwiftUI 9 | import RealityKit 10 | 11 | struct ExampleView: View { 12 | @Environment(AppModel.self) private var appModel 13 | @Environment(\.openImmersiveSpace) private var openImmersiveSpace 14 | 15 | let example: Example 16 | 17 | var body: some View { 18 | HStack { 19 | Image(example.thumbnail) 20 | .resizable() 21 | .scaledToFit() 22 | .frame(height: 300) 23 | 24 | VStack { 25 | Text(example.name) 26 | .font(.title) 27 | .padding() 28 | 29 | Text("ShaderGraph: " + example.sceneName) 30 | .foregroundStyle(.secondary) 31 | .padding() 32 | 33 | ForEach(example.description, id: \.self) { description in 34 | Text(description) 35 | .foregroundStyle(.secondary) 36 | } // ForEach 37 | .frame(width: 300) 38 | .padding(.horizontal, 8) 39 | 40 | Button(action: { showImmersiveSpace() }, label: { 41 | Text("Open the Example Scene") 42 | }) 43 | .background(appModel.immersiveSpaceState == .closed 44 | ? Color.blue : Color.clear) 45 | .cornerRadius(26) 46 | .disabled(appModel.immersiveSpaceState != .closed) 47 | .padding() 48 | } // VStack 49 | } // HStack 50 | } // body 51 | 52 | private func showImmersiveSpace() { 53 | guard appModel.immersiveSpaceState == .closed else { return } 54 | 55 | Task { 56 | appModel.immersiveSpaceState = .inTransition 57 | switch await openImmersiveSpace(id: appModel.immersiveSpaceID, 58 | value: example) { 59 | case .opened: 60 | // Don't set immersiveSpaceState to .open because there 61 | // may be multiple paths to ImmersiveView.onAppear(). 62 | // Only set .open in ImmersiveView.onAppear(). 63 | break 64 | case .userCancelled, .error: 65 | // On error, we need to mark the immersive space 66 | // as closed because it failed to open. 67 | fallthrough 68 | @unknown default: 69 | // On unknown response, assume space did not open. 70 | appModel.immersiveSpaceState = .closed 71 | } 72 | } 73 | } 74 | } 75 | 76 | #Preview(windowStyle: .automatic) { 77 | ExampleView(example: ExampleList.examples.first!) 78 | .environment(AppModel()) 79 | } 80 | -------------------------------------------------------------------------------- /ShaderGraphByExamples/Views/ImmersiveView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImmersiveView.swift 3 | // ShaderGraphByExamples 4 | // 5 | // Created by Yasuhito Nagatomo on 2024/09/29. 6 | // 7 | 8 | import SwiftUI 9 | import RealityKit 10 | import RealityKitContent 11 | 12 | struct ImmersiveView: View { 13 | @Binding var example: Example? 14 | 15 | var body: some View { 16 | RealityView { content in 17 | if let example, 18 | let root = try? await Entity(named: example.sceneName, 19 | in: realityKitContentBundle) { 20 | root.position = [0, 1.5, -1.5] 21 | content.add(root) 22 | } 23 | } 24 | } 25 | } 26 | 27 | // #Preview(immersionStyle: .mixed) { 28 | // ImmersiveView(example: ExampleList.examples.first) 29 | // .environment(AppModel()) 30 | // } 31 | -------------------------------------------------------------------------------- /img/appledepthpro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/appledepthpro.jpg -------------------------------------------------------------------------------- /img/banner.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/banner.heic -------------------------------------------------------------------------------- /img/blendersbs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/blendersbs.jpg -------------------------------------------------------------------------------- /img/depthprobinary.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/depthprobinary.jpg -------------------------------------------------------------------------------- /img/ex01.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/ex01.heic -------------------------------------------------------------------------------- /img/ex02.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/ex02.heic -------------------------------------------------------------------------------- /img/ex03.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/ex03.heic -------------------------------------------------------------------------------- /img/ex04.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/ex04.heic -------------------------------------------------------------------------------- /img/ex05.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/ex05.heic -------------------------------------------------------------------------------- /img/ex06.heic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/ex06.heic -------------------------------------------------------------------------------- /img/howtocreate3dtexture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ynagatomo/ShaderGraphByExamples/e7aea80517c5819a7b17d2032830633cdad0b67e/img/howtocreate3dtexture.jpg --------------------------------------------------------------------------------