fix: resolve incorrect depth mode rendering #204
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR corrects an issue with the depth sorting order for Gaussian point rendering.
Problem
As I understand the rendering pipeline, once the camera is set, the 3D Gaussian points should be processed as "translucent objects." This requires sorting them from farthest to nearest relative to the camera. Consequently, in the sorted array:
However, the current implementation in
gaussian.wgslappears to have this order reversed, which may lead to incorrect blending and visual artifacts.Solution
The depth-related logic in
gaussian.wgslhas been adjusted to ensure the points are sorted and processed in the correct "farthest first" order.Feature Request: Output Linear Depth in a Single-Channel Image
I've noticed the depth map is currently saved as an RGB image. Would it be possible to modify the system to also (or alternatively) output a single-channel depth map?
The goal is to have an image where the value of each pixel (e.g., in the R channel if saved in a format that supports it) directly encodes the linear depth from the camera to the Gaussian point. A grayscale image would be perfectly suited for this.