From f49794d6c6379f6b40b381500557c8e10268d8f2 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 21 Jun 2017 19:00:39 -0400 Subject: [PATCH] - fixed: Due to recent changes, textures now use 'bgra' format in OpenGL. The palette tonemap shader had not yet been updated to reflect this. --- src/gl/renderer/gl_postprocess.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index 2f9b31bbb..06ae5d86b 100644 --- a/src/gl/renderer/gl_postprocess.cpp +++ b/src/gl/renderer/gl_postprocess.cpp @@ -531,9 +531,9 @@ void FGLRenderer::CreateTonemapPalette() { PalEntry color = GPalette.BaseColors[(uint8_t)PTM_BestColor((uint32_t *)GPalette.BaseColors, (r << 2) | (r >> 4), (g << 2) | (g >> 4), (b << 2) | (b >> 4), 0, 256)]; int index = ((r * 64 + g) * 64 + b) * 4; - lut[index] = color.r; + lut[index] = color.b; lut[index + 1] = color.g; - lut[index + 2] = color.b; + lut[index + 2] = color.r; lut[index + 3] = 255; } }