summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/rasterizer.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp12
2 files changed, 10 insertions, 6 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp
index f81f529b6..b9f5d4533 100644
--- a/src/video_core/rasterizer.cpp
+++ b/src/video_core/rasterizer.cpp
@@ -946,8 +946,8 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, const Shader
946 946
947 // Blend the fog 947 // Blend the fog
948 for (unsigned i = 0; i < 3; i++) { 948 for (unsigned i = 0; i < 3; i++) {
949 combiner_output[i] = 949 combiner_output[i] = static_cast<u8>(fog_factor * combiner_output[i] +
950 static_cast<u8>(fog_factor * combiner_output[i] + (1.0f - fog_factor) * fog_color[i]); 950 (1.0f - fog_factor) * fog_color[i]);
951 } 951 }
952 } 952 }
953 953
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index e5f4366c1..1b734aaa5 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -213,12 +213,16 @@ void RasterizerOpenGL::DrawTriangles() {
213 213
214 // Scissor checks are window-, not viewport-relative, which means that if the cached texture 214 // Scissor checks are window-, not viewport-relative, which means that if the cached texture
215 // sub-rect changes, the scissor bounds also need to be updated. 215 // sub-rect changes, the scissor bounds also need to be updated.
216 GLint scissor_x1 = static_cast<GLint>(rect.left + regs.scissor_test.x1 * color_surface->res_scale_width); 216 GLint scissor_x1 =
217 GLint scissor_y1 = static_cast<GLint>(rect.bottom + regs.scissor_test.y1 * color_surface->res_scale_height); 217 static_cast<GLint>(rect.left + regs.scissor_test.x1 * color_surface->res_scale_width);
218 GLint scissor_y1 =
219 static_cast<GLint>(rect.bottom + regs.scissor_test.y1 * color_surface->res_scale_height);
218 // x2, y2 have +1 added to cover the entire pixel area, otherwise you might get cracks when 220 // x2, y2 have +1 added to cover the entire pixel area, otherwise you might get cracks when
219 // scaling or doing multisampling. 221 // scaling or doing multisampling.
220 GLint scissor_x2 = static_cast<GLint>(rect.left + (regs.scissor_test.x2 + 1) * color_surface->res_scale_width); 222 GLint scissor_x2 =
221 GLint scissor_y2 = static_cast<GLint>(rect.bottom + (regs.scissor_test.y2 + 1) * color_surface->res_scale_height); 223 static_cast<GLint>(rect.left + (regs.scissor_test.x2 + 1) * color_surface->res_scale_width);
224 GLint scissor_y2 = static_cast<GLint>(
225 rect.bottom + (regs.scissor_test.y2 + 1) * color_surface->res_scale_height);
222 226
223 if (uniform_block_data.data.scissor_x1 != scissor_x1 || 227 if (uniform_block_data.data.scissor_x1 != scissor_x1 ||
224 uniform_block_data.data.scissor_x2 != scissor_x2 || 228 uniform_block_data.data.scissor_x2 != scissor_x2 ||