swift
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
How to get all values of an enum in swift [duplicate]
I don’t know if there is a method to do that. It’s a really good question, hope someone will find another way much generic that mine. Anyways, I’ve done something that do the trick: Here the enum: // SuitCount is the last one, so the total of elements (used) is SuitCount-1 enum Suit: Int { … Read more