deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

Sharp line ends in path layer

Open jianhuang01 opened this issue 9 years ago • 2 comments

Pull down NVIDIA_PROBLEM_DEMO branch, and run layer-browser example on computer which has discrete video card. Disable default ScatterplotLayer and enable PathMarkerLayer (Meter) under Experimental Layers, the red line has a sharp end.

sharp_end

jianhuang01 avatar Nov 30 '17 00:11 jianhuang01

Here are my findings so far: When used different color for each triangle:

Good (Intel Iris Pro) screen shot 2017-11-29 at 6 01 02 pm

Bad (AMD AMD Radeon R9 M370X) screen shot 2017-11-29 at 5 59 09 pm

Offset calculation for bottom triangle is wrong, causing it move the vertex by some offset. Based on zoom level this affects one of the two vertices of bottom triangle.

Also this offset in vertex is proportional to the width of the segment, here is the rendering after setting the widthScale to max: screen shot 2017-11-29 at 6 34 54 pm

So we need to focus on vertex shader instructions that use widthScale

1chandu avatar Nov 30 '17 02:11 1chandu

The spike on the end is caused by precision issue on mix function. but there is also precision issue when calculating the joint, which can make some other cases fail to render on any video card. For example: with path:
[8584.484798702775, 6742.5945553739575], [2908.5139320879325, 429.453672569738], [8000.484798702775, 6742.5945553739575], [8000.485798702775, 6742.5945553739575], [5100.486798702775, 7742.5945553739575]

Bad result:

spike

with Fix #1200 spike2

#1200 still didn't fix all the cases, for example: with path [8584.484798702775, 6742.5945553739575], [2908.5139320879325, 429.453672569738], [8000.484798702775, 6742.5945553739575], [8000.484798702775, 6742.5945553739575], [8000.484798702775, 6742.5945553739575], [5100.486798702775, 7742.5945553739575]

gap There is a gap on the top joint.

jianhuang01 avatar Nov 30 '17 21:11 jianhuang01