Post

Replies

Boosts

Views

Activity

Reply to How to use KTX file Image3D in ShaderGraph?
Also tried create 3D texture from PNG images and set parameter on ShaderGraphMaterial. But still not work. Image3D/Image3DPixel output always white, Image3DRead output always black. var images: [CGImage] = [] for i in 0..<32 { let image = UIImage(named: "\(i).png")!.cgImage! images.append(image) } let tex = try! await TextureResource.texture3D(slices: images, options: TextureResource.CreateOptions(semantic: .color)) let entity = scene.findEntity(named: "Slice")! var material = entity.components[ModelComponent.self]!.materials.first as! ShaderGraphMaterial try! material.setParameter(name: "Volume", value: .textureResource(tex)) So, likely the problem does not come from the KTX file, but Realitykit does not support Image3D yet?
Oct ’24