Using a MTLTexture as the environment map of a SCNScene

Lighting SCN Environment with an MTK texture Using Xcode 13.3.1 on macOS 12.3.1 for iOS 15.4 app. The trick is, the environment lighting requires a cube texture, not a flat image. Create 6 square images for MetalKit cube texture in Xcode Assets folder create Cube Texture Set place textures to their corresponding slots mirror images … Read more

Why is writing to a buffer from within a fragment shader disallowed in Metal?

Writes to buffers from fragment shaders is now supported, as mentioned in What’s New in iOS 10, tvOS 10, and macOS 10.12 Function Buffer Read-Writes Available in: iOS_GPUFamily3_v2, OSX_GPUFamily1_v2 Fragment functions can now write to buffers. Writable buffers must be declared in the device address space and must not be const. Use dynamic indexing to … Read more

LiDAR and RealityKit – Capture a Real World Texture for a Scanned Model

Object Reconstruction 10 October 2023, Apple released iOS Reality Composer 1.6 app that is capable of capturing a real world model’s mesh with texture in realtime using the LiDAR scanning process. But at the moment there’s still no native programmatic API for that (but we are all looking forward to it). Also, there’s a methodology … Read more

Xcode logging: “Metal API Validation Enabled”

Toggle Metal API Validation via your Xcode Scheme: Scheme > Edit Scheme… > Run > Diagnostics > Metal API Validation. It’s a checkbox, so the possible options are Enabled or Disabled. Disabling sets the key enableGPUValidationMode = 1 in your .xcscheme file. After disabling, Xcode no longer logs the “Metal API Validation Enabled” log message. … Read more

RealityKit vs SceneKit vs Metal – High-Quality Rendering

Updated: March 11, 2023. TL;DR This post is not only about RealityKit, SceneKit & Metal, but also about related APIs and USD files. RealityKit 2.0 RealityKit is the youngest SDK in Apple family of rendering technologies. This high-level framework was released in 2019. RealityKit is made for AR / VR projects, has simplified settings for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)