Webgl points renderer / fix hit detection

Due to the fact that the points renderer does not know for sure
which attributes will be used for rendering, it is now mandatory
to provide both vertex/fragment shaders for rendering AND hit
detection.

The hit detection shaders should expect having an `a_hitColor`
that they should return to allow matching the feature uid.

This will be all one eventually by shader builders under the hood.
This commit is contained in:
Olivier Guyot
2019-09-25 12:11:06 +02:00
parent 109f9718f9
commit 23c2999cab
4 changed files with 140 additions and 86 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ const worker = self;
worker.onmessage = event => {
const received = event.data;
if (received.type === WebGLWorkerMessageType.GENERATE_BUFFERS) {
// This is specific to point features
// This is specific to point features (x, y, index)
const baseVertexAttrsCount = 3;
const baseInstructionsCount = 2;