Przeglądaj źródła

GL3 renderer: Use "constant color" instead of "constant alpha" blend mode for the opacity filter

Adjust blend color accordingly. This should be equivalent, but fixes an issue on my WSL setup where the opacity filter would always produce a black output.
Michael Ragazzon 1 rok temu
rodzic
commit
9315e95101
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      Backends/RmlUi_Renderer_GL3.cpp

+ 2 - 2
Backends/RmlUi_Renderer_GL3.cpp

@@ -1773,8 +1773,8 @@ void RenderInterface_GL3::RenderFilters(Rml::Span<const Rml::CompiledFilterHandl
 		case FilterType::Passthrough:
 		{
 			UseProgram(ProgramId::Passthrough);
-			glBlendFunc(GL_CONSTANT_ALPHA, GL_ZERO);
-			glBlendColor(0.0f, 0.0f, 0.0f, filter.blend_factor);
+			glBlendFunc(GL_CONSTANT_COLOR, GL_ZERO);
+			glBlendColor(filter.blend_factor, filter.blend_factor, filter.blend_factor, filter.blend_factor);
 
 			const Gfx::FramebufferData& source = render_layers.GetPostprocessPrimary();
 			const Gfx::FramebufferData& destination = render_layers.GetPostprocessSecondary();