Update color matrices based on framestate values
In getColorMatrix method, we'll update the color matrices only if layerstate color properties has changed in the framestate.
This commit is contained in:
@@ -643,7 +643,12 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) {
|
||||
layerRenderer.getProjectionMatrix());
|
||||
if (useColor) {
|
||||
gl.uniformMatrix4fv(locations.u_colorMatrix, false,
|
||||
layerRenderer.getColorMatrix());
|
||||
layerRenderer.getColorMatrix(
|
||||
layerState.brightness,
|
||||
layerState.contrast,
|
||||
layerState.hue,
|
||||
layerState.saturation
|
||||
));
|
||||
}
|
||||
gl.uniform1f(locations.u_opacity, layerState.opacity);
|
||||
gl.bindTexture(goog.webgl.TEXTURE_2D, layerRenderer.getTexture());
|
||||
|
||||
Reference in New Issue
Block a user