diff --git a/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp b/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp index 91dbf81e..4abb5a1c 100644 --- a/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp @@ -298,7 +298,7 @@ void RadarProductLayer::UpdateColorTable() gl.glGenerateMipmap(GL_TEXTURE_1D); gl.glUniform1ui(p->uDataMomentOffsetLocation_, rangeMin); - gl.glUniform1f(p->uDataMomentScaleLocation_, rangeMax - rangeMin); + gl.glUniform1f(p->uDataMomentScaleLocation_, scale); } void RadarProductLayer::UpdateColorTableNextFrame() diff --git a/scwx-qt/source/scwx/qt/view/level2_product_view.cpp b/scwx-qt/source/scwx/qt/view/level2_product_view.cpp index bc430a54..4f5932ef 100644 --- a/scwx-qt/source/scwx/qt/view/level2_product_view.cpp +++ b/scwx-qt/source/scwx/qt/view/level2_product_view.cpp @@ -209,7 +209,7 @@ void Level2ProductView::UpdateColorTable() } boost::integer_range dataRange = - boost::irange(rangeMin, rangeMax); + boost::irange(rangeMin, rangeMax + 1); std::vector& lut = p->colorTableLut_; lut.resize(rangeMax - rangeMin + 1); @@ -309,8 +309,7 @@ void Level2ProductView::ComputeSweep() // Compute threshold at which to display an individual bin const float scale = momentData0->scale(); const float offset = momentData0->offset(); - const uint16_t snrThreshold = - std::lroundf(momentData0->snr_threshold_raw() * scale / 10 + offset); + const uint16_t snrThreshold = momentData0->snr_threshold_raw(); // Azimuth resolution spacing: // 1 = 0.5 degrees