CesiumGS / CesiumGS/cesium

Points still draw with outline even when outlineWidth = 0

Open
#7,016 1 comment 1 reaction 0 assignees View on GitHub
category - graphics type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

At the entity level, the default outline color is black. In this sandcastle, the point should be invisible, but the outline is still visible. This happens in realistic situations but the bug is obvious to see visually when the fill color is transparent.

Sandcastle:

https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=hVLBbtswDP0VwZc4QKakyIp0ix2syHII0GVBW3QXXxSLSYjJUkDJ7ryi/7Jv2ZeNtmc0Ww/1SXzke+QjXSkSFcIjkEiFhUexBI9lIR9aLB7kbbh0Nii0QIPhPLMVc8AGDDVzOrJsYwQvldbxU2YFfyfnGXNWfOxVl4oCv5Sdyj254jMcCMDH72aX8vLDbDYbifcTOZleXU2Ho14DbWCBv5IthD/A3OFPYPhiMnpJ5M44OmvWhPL+9npzt72+XW3uz0pdGQz7+YY6HJkx6TLPmX1uDLLFzlUglX8HverNdq67Cl6CVaEkZVbs6viyip3ycKNqoC0ymWQDf3EajMRCHYDqLbkKNdBDn/Byj1bH+9Lmzb5iHIonQcDiVqC0qgCRpqkYbLp+om34+9d6PZiLduA3O3swkAfQ626C5tZns8+jUZT4UBtYdIv4hMXJURAlmVjKcYDiZBRfbrwrWTjI3PumbTLuSYnGSqBOs+i/HyaLRG6U95zZl6Y9WxYtkjHX/0MzTmm0h68VkFF1U3K8WNx0oJQyGXP4mhWcMztFZ4p/AA

```javascript
var entity = viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
point : {
pixelSize : 10,
color : Cesium.Color.TRANSPARENT,
outlineWidth : 0
}
});
```

![image](https://user-images.githubusercontent.com/32828/45177715-b6f3f780-b1e1-11e8-9b8a-ab60eac1f094.png)

I traced this far enough to suspect that the bug is in the shader code for points, where it mixes the outline color with the fill color regardless of the outline width value.

Contributor guide

Open the contributing guide

Research direction

Start with the linked Sandcastle reproduction and trace the point shader code that mixes the outline and fill colors. Confirm the behavior with a transparent fill and outlineWidth set to 0; done means the point is invisible and no outline remains.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.