Skip to content

Commit

Permalink
Bring back gpu sort.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwa committed Oct 4, 2024
1 parent 7bb0e23 commit 22a8857
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions Sources/GaussianSplatSupport/GaussianSplatViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,29 +153,29 @@ public class GaussianSplatViewModel <Splat> where Splat: SplatProtocol {
let fullRedraw = true
let sortEnabled = (frame <= 1 || frame.isMultiple(of: 15))
self.pass = try GroupPass(id: "FullPass") {
// GroupPass(id: "GaussianSplatRenderGroup", enabled: fullRedraw, renderPassDescriptor: offscreenRenderPassDescriptor) {
// if configuration.useGPUSort {
// GaussianSplatDistanceComputePass(
// id: "SplatDistanceCompute",
// enabled: sortEnabled,
// splats: splats,
// modelMatrix: simd_float3x3(truncating: splatsNode.transform.matrix),
// cameraPosition: cameraNode.transform.translation
// )
// GaussianSplatBitonicSortComputePass(
// id: "SplatBitonicSort",
// enabled: sortEnabled,
// splats: splats
// )
// }
// PanoramaShadingPass(id: "Panorama", scene: scene)
// GaussianSplatRenderPass<Splat>(
// id: "SplatRender",
// enabled: true,
// scene: scene,
// discardRate: configuration.discardRate
// )
// }
GroupPass(id: "GaussianSplatRenderGroup", enabled: fullRedraw, renderPassDescriptor: offscreenRenderPassDescriptor1) {
if configuration.useGPUSort {
GaussianSplatDistanceComputePass(
id: "SplatDistanceCompute",
enabled: sortEnabled,
splats: splats,
modelMatrix: simd_float3x3(truncating: splatsNode.transform.matrix),
cameraPosition: cameraNode.transform.translation
)
GaussianSplatBitonicSortComputePass(
id: "SplatBitonicSort",
enabled: sortEnabled,
splats: splats
)
}
PanoramaShadingPass(id: "Panorama", scene: scene)
GaussianSplatRenderPass<Splat>(
id: "SplatRender",
enabled: true,
scene: scene,
discardRate: configuration.discardRate
)
}
GroupPass(id: "GaussianSplatRenderGroup-1", enabled: fullRedraw, renderPassDescriptor: offscreenRenderPassDescriptor1) {
PanoramaShadingPass(id: "Panorama", scene: scene)
}
Expand Down

0 comments on commit 22a8857

Please sign in to comment.