Shader Experiments
Skills
Metal
RealityKit
ARKit
SceneKit
Experimenting with Metal Shaders to achieve desired effects
#Metal #RealityKit #SceneKit #ARKit #ShaderProgramming #Experiment
Night Vision Post Process
While starting work on this Ghost Hunt AR game, I built shaders to emulate night vision. On LiDAR-enabled devices it uses the ARKit depth map from the LiDAR sensor, and combines that depth map with the depth map from RealityKit's frame render to make it look like the user is seeing the ghosts with a night vision device. On devices without LiDAR, I built another shader to make it stylized, but without the depth effect.
Combining SceneKit and RealityKit
Before iOS 18.0, RealityKit on iOS did not have particle effects, but SceneKit did, and SceneKit was not soft deprecated yet. I wanted to use SceneKit's particle system, but my game was rendered in RealityKit. I figured out how to convert the depth maps to be in the same range, allowing me to composite SceneKit and RealityKit together in the same scene. You can see this in the example where the fighter jet is rendered in SceneKit and the grey cube is rendered in RealityKit.