Skip to content
Open
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased

### Added
* Added a check before applying circular mask on points to be rendered, because with some drivers, gl_PointCoords can be invalid and thus no point is rendered (problem detected on Fedora 43 with intel igpu)

### Changed

Expand Down
12 changes: 8 additions & 4 deletions src/compas_viewer/renderer/shaders/model.frag
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,15 @@ void main() {
alpha = max(alpha, 0.5);
}

// Draw circular points
// Draw circular points if gl_PointCoord allows
if (element_type == 0) {
vec2 center = gl_PointCoord - vec2(0.5);
if (length(center) > 0.5) {
discard;

// Only apply mask if gl_PointCoord is valid
if (gl_PointCoord.x > 1e-5 || gl_PointCoord.y > 1e-5){
vec2 center = gl_PointCoord - vec2(0.5);
if (length(center) > 0.5) {
discard;
}
}
}

Expand Down