Skip to content

Commit

Permalink
Swiftlint
Browse files Browse the repository at this point in the history
  • Loading branch information
schwa committed Oct 14, 2024
1 parent 3c17c05 commit 5c10b95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
7 changes: 0 additions & 7 deletions Sources/GaussianSplatSupport/SplatConverter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@ import SIMDSupport
public extension SplatC {
init(_ other: SplatB) {
let position = PackedHalf3(SIMD3<Float>(other.position))

// TODO: SRGB to Linear

// let color = other.color.xyz.sRGBToLinear()
let rgb = (SIMD3<Float>(other.color.xyz) / 255).sRGBToLinear()
let alpha = Float(other.color[3]) / 255

let color = PackedHalf4(SIMD4<Float>(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,
Expand All @@ -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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public struct GaussianSplatLobbyView: View {
)
}
Button("Go!") {
// configuration.bounds = source.bounds
// configuration.bounds = source.bounds
mode = .render
}
.frame(maxWidth: .infinity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5c10b95

Please sign in to comment.