PixelKit Demos

Particle Noise Plane

pod 'PixelKit'
pod 'VertexKit'
import PixelKit
import VertexKit
view.backgroundColor = .black
        
PixelKit.main.bits = ._16

let res: PIX.Res = .fullscreen
let pres: PIX.Res = .fullscreen

let uv = MetalPIX._uv(res: pres)
let puv = (uv - 0.5) * pres.aspect * .red
        + (uv - 0.5) * .green

let noise = NoisePIX(res: pres)
noise.colored = true
noise.octaves = 4
noise.zoom = 0.25
noise.zPosition = .live / 10

let gradient = GradientPIX(res: pres)
gradient.direction = .radial

let map = puv + (noise - 0.5) * (gradient !** 0.5)

let particles = ParticlesUV3DPIX(res: res)
particles.vtxPixIn = map
particles.color = LiveColor(lum: 1.0, a: 0.5)

let finalPix = particles
finalPix.view.frame = view.bounds
finalPix.view.checker = false
view.addSubview(finalPix.view)
Created by Hexagons