CesiumGS / CesiumGS/cesium

Polyline texture coordinate chunkiness

Open
#7,689 2 comments 0 reactions 0 assignees View on GitHub
category - graphics category - polyline type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Polylines have texture coordinates that indicate to the shader where a given pixel is along the width of the line, and along the length of the line. The width positioning seems quite stable, but the length position somehow is quantized into chunks, or rounded in some way. It appears to update only at intervals, even when the line grows every frame.

I've [made a demo](https://sandcastle.cesium.com/#c=pVZtU+M2EP4rGr7gFOM4BA6O5JjmONqhAyRD0uuXzHQUe5NoTpY8khxIb/jvXckvkcN1KK0/JNbuPqt9ebTWhiqyYfAEinwiAp7INWhWZNFXJwsOE7e8lsJQJkAdhuT7XBB8WEZXoLYTJTcsRfSlj54xDvc0n4LasARu26ZB5cE+heKIrFCLgvH0XqYFh98VDw5HWoPR3Rk8m0KB7j5Q/Kf8hiqzvr097JRuXjph+bKgGu7oFtSEJd9cREvKNVTaFchEpq/ETCzlZ/m8J9VrWfB0JDBJA6gzqoC5eOkM5mIuNlgyUWQLUOPlSCUaC3cSD0q5NhjcnRQoOz4/bQmpQWH/Y+nCVTdKuEy+lb+PVKwADapSXDey6G48nvw5nY0ngz1cVnDDcs5c63oXcdxE5zacscw6bEEaRRVZxtLKrNr3t4IzKr5g1hFN0ykkUqQ6aGAhOe2fxHHo93oHCTqdJmOZv9PxxYfTNxzPsVWKBNY/Q8fxAP+GrU4MyNER69QMtYaJ5FJ5ZbXLaKlkhrVNZeZTMWPY7iJ7hBQbHkf9s/CV7lcFIP5R+5kX8FpJeb6mKO5Fcc3XwS4+W6iSLlWE99SsI4GMLwN8cNkFHfIT6Z9dkGPSO/+4D3fEehPeO7fwi5J/Ft/tkmsFlt8U/SjKVmtzzPGQk9w62W2SK5mDMtv2gJjSLOeQTqRmhkkxqYyCdnbY3trC6wJK8Y2KvmvFF1hhXSsyYDHC5sCEJK7d1UE49ritffK0Ntqv7zsCcM0I67K+tX3J8bC1Scev7y9MpMSswZ6zXDJhiFy6dV1vV+qQYK8ICjQQZjQyxjBTpOC1APETh2+lIFeK5muWuCSanIIm1hWYrxRJGVTHvFNnU7uL1uCi+Bf0OYvtQ47ISfk22AuuKXE1b3QCAqIVlwuIgHOWa8nSKPGinsldyP5ZKkNrTYJdv+pJUBUYD6t0BbV1JEaSBbilxVKVRO3mvY/A/4FxP4BUpQ/9Kv0/UtWHVpAbgUTZ2rTxe/XkEt8lbTuDq8qm6QvYNQNt9/SnX1538LIJK/S1lnyXxAM4MXsGPmV/2bHXPwnbynL0XrZH7+xx9DCdjB5vHmZ75rIwdvhcVyiH/rHJHyzFZuOOO+2LHyt12r1Q8f4geVFl2LPfsLbefugVo7x9j5lIvrVbjpSST/eVScMUF2Nnz9FTHd3+DhyoowJ+IfY0dhjwUtWDXuyl5X0xytemo1HdsAjvSLcCI8slp1Ywzu2v9pvLfH057TBC/yvVshjxlVTMrLNd9+4onlq8jdiCCJlhFUY58uTZXpAQ4cWJMR+EB0NtthyuSvnPLMulMvayF0RR1wBSHWupu4sCL2omSrS2yGG3Bg1TtiEs/TQ/2Lt+zg9IwqnWqFkW3FFvfnA17KJ9C8YlTZlYjTegON1ak3Xv6q4URlE07OLyNcpIyRdUeR7/Bg) that shows how this affects the arrow material, but I also have cases where this affects other materials too. I think it's an issue with the way the texture coordinates are calculated.

![GrowingPolylines](https://user-images.githubusercontent.com/1235080/55236587-ad29f400-5206-11e9-9f86-2f8406481064.gif)

What we're supposed to see in this demo is some growing arrow lines, with circled arrow heads (the circles come from large point outlines). You can see that the circles (points) travel smoothly, as expected, and the polyline grows smoothly, but the arrowheads are not smooth.

Contributor guide

Open the contributing guide

Research direction

Start with the linked Sandcastle demo and trace how polyline texture coordinates are calculated for the growing line, comparing them with the smoothly moving point outlines. Done means the length coordinate updates smoothly as the line grows and arrowhead and other polyline materials render without visible chunking.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.