diff --git a/Sources/GaussianSplatSupport/SplatConverter.swift b/Sources/GaussianSplatSupport/SplatConverter.swift index 991091c..8cf9fcb 100644 --- a/Sources/GaussianSplatSupport/SplatConverter.swift +++ b/Sources/GaussianSplatSupport/SplatConverter.swift @@ -5,15 +5,9 @@ import SIMDSupport public extension SplatC { init(_ other: SplatB) { let position = PackedHalf3(SIMD3(other.position)) - - // TODO: SRGB to Linear - - // let color = other.color.xyz.sRGBToLinear() let rgb = (SIMD3(other.color.xyz) / 255).sRGBToLinear() let alpha = Float(other.color[3]) / 255 - let color = PackedHalf4(SIMD4(rgb, alpha)) - let rotation = simd_quatf(vector: SIMD4(x: Float(other.rotation[1]) - 128, y: Float(other.rotation[2]) - 128, z: Float(other.rotation[3]) - 128, @@ -22,7 +16,6 @@ public extension SplatC { let cov3D = transform * transform.transpose let cov_a = PackedHalf3(x: Float16(cov3D[0, 0]), y: Float16(cov3D[0, 1]), z: Float16(cov3D[0, 2])) let cov_b = PackedHalf3(x: Float16(cov3D[1, 1]), y: Float16(cov3D[1, 2]), z: Float16(cov3D[2, 2])) - self = SplatC(position: position, color: color, cov_a: cov_a, cov_b: cov_b) } } diff --git a/Sources/SwiftGraphicsDemos/GaussianSplatDemos/GaussianSplatLobbyView.swift b/Sources/SwiftGraphicsDemos/GaussianSplatDemos/GaussianSplatLobbyView.swift index 81a6c66..5f7c52a 100644 --- a/Sources/SwiftGraphicsDemos/GaussianSplatDemos/GaussianSplatLobbyView.swift +++ b/Sources/SwiftGraphicsDemos/GaussianSplatDemos/GaussianSplatLobbyView.swift @@ -92,7 +92,7 @@ public struct GaussianSplatLobbyView: View { ) } Button("Go!") { -// configuration.bounds = source.bounds + // configuration.bounds = source.bounds mode = .render } .frame(maxWidth: .infinity) diff --git a/Sources/SwiftGraphicsDemos/GaussianSplatDemos/GaussianSplatView.swift b/Sources/SwiftGraphicsDemos/GaussianSplatDemos/GaussianSplatView.swift index 3223b94..1e0b072 100644 --- a/Sources/SwiftGraphicsDemos/GaussianSplatDemos/GaussianSplatView.swift +++ b/Sources/SwiftGraphicsDemos/GaussianSplatDemos/GaussianSplatView.swift @@ -71,10 +71,10 @@ internal struct GaussianSplatView: View { VStack { if options.showInfo { InfoView() - .padding() - .background(.thinMaterial) - .cornerRadius(8) - .padding() + .padding() + .background(.thinMaterial) + .cornerRadius(8) + .padding() } if options.showCounters { if let gpuCounters {