From 8c93a4557419ccdec2598af32e3305bdefbbd23b Mon Sep 17 00:00:00 2001 From: Arisotura Date: Sat, 25 May 2019 13:45:00 +0200 Subject: also support alpha-only fog --- src/GPU3D_OpenGL.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/GPU3D_OpenGL.cpp b/src/GPU3D_OpenGL.cpp index 759c404..9144792 100644 --- a/src/GPU3D_OpenGL.cpp +++ b/src/GPU3D_OpenGL.cpp @@ -861,7 +861,10 @@ void RenderSceneChunk(int y, int h) glUseProgram(FinalPassShader[2]); glEnable(GL_BLEND); - glBlendFuncSeparate(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_ALPHA, GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_ALPHA); + if (RenderDispCnt & (1<<6)) + glBlendFuncSeparate(GL_ZERO, GL_ONE, GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_ALPHA); + else + glBlendFuncSeparate(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_ALPHA, GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_ALPHA); { u32 c = RenderFogColor; -- cgit v1.2.3