diff options
| author | 2015-10-07 21:01:28 -0400 | |
|---|---|---|
| committer | 2015-10-21 21:53:18 -0400 | |
| commit | bd833b8dd8b872833a6867266da4d61f058e340f (patch) | |
| tree | b2033e56d78ad5396fd29a17c28d57e9a272042d | |
| parent | gl_rasterizer: Add documentation to ShaderCacheKey. (diff) | |
| download | yuzu-bd833b8dd8b872833a6867266da4d61f058e340f.tar.gz yuzu-bd833b8dd8b872833a6867266da4d61f058e340f.tar.xz yuzu-bd833b8dd8b872833a6867266da4d61f058e340f.zip | |
gl_shader_gen: Fix bug where TEV stage outputs should be clamped.
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 5093710d4..74f0d4805 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp | |||
| @@ -307,9 +307,9 @@ static void WriteTevStage(std::string& out, const ShaderCacheKey& config, unsign | |||
| 307 | AppendAlphaCombiner(out, stage.alpha_op, "alpha_results_" + index_name); | 307 | AppendAlphaCombiner(out, stage.alpha_op, "alpha_results_" + index_name); |
| 308 | out += ";\n"; | 308 | out += ";\n"; |
| 309 | 309 | ||
| 310 | out += "g_last_tex_env_out = vec4(min(color_output_" + index_name + " * " + | 310 | out += "g_last_tex_env_out = vec4(" |
| 311 | std::to_string(stage.GetColorMultiplier()) + ".0, 1.0), min(alpha_output_" + index_name + " * " + | 311 | "clamp(color_output_" + index_name + " * " + std::to_string(stage.GetColorMultiplier()) + ".0, 0.0, 1.0)," |
| 312 | std::to_string(stage.GetAlphaMultiplier()) + ".0, 1.0));\n"; | 312 | "clamp(alpha_output_" + index_name + " * " + std::to_string(stage.GetAlphaMultiplier()) + ".0, 0.0, 1.0));\n"; |
| 313 | } | 313 | } |
| 314 | 314 | ||
| 315 | if (config.TevStageUpdatesCombinerBufferColor(index)) | 315 | if (config.TevStageUpdatesCombinerBufferColor(index)) |