diff --git a/src/ol/layer/Heatmap.js b/src/ol/layer/Heatmap.js index 8600259861..bbdd760b67 100644 --- a/src/ol/layer/Heatmap.js +++ b/src/ol/layer/Heatmap.js @@ -183,24 +183,18 @@ class Heatmap extends VectorLayer { precision mediump float; attribute vec2 a_position; attribute vec2 a_texCoord; - attribute float a_rotateWithView; attribute vec2 a_offsets; attribute float a_opacity; uniform mat4 u_projectionMatrix; uniform mat4 u_offsetScaleMatrix; - uniform mat4 u_offsetRotateMatrix; uniform float u_size; varying vec2 v_texCoord; varying float v_opacity; void main(void) { - mat4 offsetMatrix = u_offsetScaleMatrix; - if (a_rotateWithView == 1.0) { - offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix; - } - vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0); + vec4 offsets = u_offsetScaleMatrix * vec4(a_offsets, 0.0, 0.0); gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets * u_size; v_texCoord = a_texCoord; v_opacity = a_opacity; diff --git a/src/ol/renderer/webgl/PointsLayer.js b/src/ol/renderer/webgl/PointsLayer.js index 7f88108688..cb282f0046 100644 --- a/src/ol/renderer/webgl/PointsLayer.js +++ b/src/ol/renderer/webgl/PointsLayer.js @@ -111,7 +111,7 @@ const HIT_FRAGMENT_SHADER = ` * source to compute the opacity of the quad on screen (from 0 to 1). This is only done on source change. * Note: this is multiplied with the color of the point which can also have an alpha value < 1. * @property {function(import("../../Feature").default):boolean} [rotateWithViewCallback] Will be called on every feature in the - * source to compute whether the quad on screen must stay upwards (`false`) or follow the view rotation (`true`). + * source to compute whether the quad on screen must stay upwards (`false`) or follow the view rotation (`true`). Default is `false`. * This is only done on source change. * @property {HTMLCanvasElement|HTMLImageElement|ImageData} [texture] Texture to use on points. `texCoordCallback` and `sizeCallback` * must be defined for this to have any effect.