From 1b6f77a473c356a1e1c691bfdbf8b453c6876910 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Thu, 12 Oct 2017 11:54:56 -0400 Subject: [PATCH] - fixed: inverted vertically texture uniforms for custom post-process shaders, and also changed their input format to BGRA to match the standard. --- src/gl/shaders/gl_postprocessshader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/shaders/gl_postprocessshader.cpp b/src/gl/shaders/gl_postprocessshader.cpp index d4ab9bbc90..3e0a3202ae 100644 --- a/src/gl/shaders/gl_postprocessshader.cpp +++ b/src/gl/shaders/gl_postprocessshader.cpp @@ -234,12 +234,12 @@ void PostProcessShaderInstance::BindTextures() { FBitmap bitmap; bitmap.Create(tex->GetWidth(), tex->GetHeight()); - tex->CopyTrueColorPixels(&bitmap, 0, 0); + tex->CopyTrueColorPixels(&bitmap, 0, 0, 6); GLuint handle = 0; glGenTextures(1, &handle); glBindTexture(GL_TEXTURE_2D, handle); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, tex->GetWidth(), tex->GetHeight(), 0, GL_RGBA, GL_UNSIGNED_BYTE, bitmap.GetPixels()); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, tex->GetWidth(), tex->GetHeight(), 0, GL_BGRA, GL_UNSIGNED_BYTE, bitmap.GetPixels()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); mTextureHandles[tex] = handle;