소스 검색

LibGL: Fix incorrect blend factor setup

Stephan Unverwerth 3 년 전
부모
커밋
3dd9efd35f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      Userland/Libraries/LibGL/SoftwareRasterizer.cpp

+ 2 - 2
Userland/Libraries/LibGL/SoftwareRasterizer.cpp

@@ -77,7 +77,7 @@ static constexpr void setup_blend_factors(GLenum mode, FloatVector4& constant, f
         src_alpha = -1;
         src_alpha = -1;
         break;
         break;
     case GL_DST_ALPHA:
     case GL_DST_ALPHA:
-        dst_alpha = -1;
+        dst_alpha = 1;
         break;
         break;
     case GL_ONE_MINUS_DST_ALPHA:
     case GL_ONE_MINUS_DST_ALPHA:
         constant = { 1.0f, 1.0f, 1.0f, 1.0f };
         constant = { 1.0f, 1.0f, 1.0f, 1.0f };
@@ -139,7 +139,7 @@ static void rasterize_triangle(const RasterizerOptions& options, Gfx::Bitmap& re
             src_factor_dst_color);
             src_factor_dst_color);
 
 
         setup_blend_factors(
         setup_blend_factors(
-            options.blend_source_factor,
+            options.blend_destination_factor,
             dst_constant,
             dst_constant,
             dst_factor_src_alpha,
             dst_factor_src_alpha,
             dst_factor_dst_alpha,
             dst_factor_dst_alpha,