isl-org / isl-org/Open3D

Rendering points as circles instead of squares

Open
#4,238 3 comments 0 reactions 1 assignee Claimed by @errissa View on GitHub
feature request rendering visualization
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

Point cloud rendered as circles looks nicer than the current squares!

If anyone wants to try it out, add these lines:
```
vec2 coord = gl_PointCoord - vec2(0.5);
if (length(coord) > 0.5) discard;
```

to `cpp/open3d/visualization/gui/Materials/defaultLit.mat` (the new visualization GUI)

```
fragment {
void material(inout MaterialInputs material) {
prepareMaterial(material);

material.baseColor.rgb = texture(materialParams_colorMap, variable_colorMapUV.st).rgb;
vec2 coord = gl_PointCoord - vec2(0.5);
if (length(coord) > 0.5) discard;
}
}
```

and to `cpp/open3d/visualization/shader/glsl/SimpleFragmentShader.glsl` (for the old visualizer)

```
void main()
{
FragColor = vec4(fragment_color, 1);
vec2 coord = gl_PointCoord - vec2(0.5);
if (length(coord) > 0.5) discard;
}
```

You might have to also add this change to other `*.mat` or `*FragmentShader.glsl` files as required.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.