From ba289c1e733b97520708741e032ffc5f16c813b0 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 27 Sep 2013 23:36:23 -0700 Subject: [PATCH] Show alpha in textures in the GE debugger. --- Windows/GEDebugger/SimpleGLWindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Windows/GEDebugger/SimpleGLWindow.cpp b/Windows/GEDebugger/SimpleGLWindow.cpp index 8f5c3a09e8..fc1d57f8d2 100644 --- a/Windows/GEDebugger/SimpleGLWindow.cpp +++ b/Windows/GEDebugger/SimpleGLWindow.cpp @@ -47,8 +47,8 @@ static const char tex_fs[] = "uniform sampler2D sampler0;\n" "varying vec2 v_texcoord0;\n" "void main() {\n" - " gl_FragColor.rgb = texture2D(sampler0, v_texcoord0).rgb;\n" - " gl_FragColor.a = 1.0;\n" + " gl_FragColor = texture2D(sampler0, v_texcoord0);\n" + " gl_FragColor.a = clamp(gl_FragColor.a, 0.2, 1.0);\n" "}\n"; static const char basic_vs[] = @@ -203,7 +203,9 @@ void SimpleGLWindow::DrawChecker() { void SimpleGLWindow::Draw(u8 *data, int w, int h, bool flipped, Format fmt, ResizeType resize) { DrawChecker(); - glDisable(GL_BLEND); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendEquation(GL_FUNC_ADD); glViewport(0, 0, w_, h_); glScissor(0, 0, w_, h_);