mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 14:22:13 +00:00
- improve the bloom blur quality slightly
This commit is contained in:
parent
fcee021753
commit
128c8d8318
1 changed files with 22 additions and 2 deletions
|
@ -104,8 +104,18 @@ void PPBloom::UpdateSteps()
|
|||
{
|
||||
auto &level = levels[i];
|
||||
auto &next = levels[i + 1];
|
||||
|
||||
steps.Push(BlurStep(blurUniforms, level.VTexture, level.HTexture, level.Viewport, false));
|
||||
steps.Push(BlurStep(blurUniforms, level.HTexture, next.VTexture, next.Viewport, true));
|
||||
steps.Push(BlurStep(blurUniforms, level.HTexture, level.VTexture, level.Viewport, true));
|
||||
|
||||
// Linear downscale:
|
||||
step.ShaderName = "BloomCombine";
|
||||
step.Uniforms.Clear();
|
||||
step.Viewport = next.Viewport;
|
||||
step.SetInputTexture(0, level.VTexture, PPFilterMode::Linear);
|
||||
step.SetOutputTexture(next.VTexture);
|
||||
step.SetNoBlend();
|
||||
steps.Push(step);
|
||||
}
|
||||
|
||||
// Blur and upscale:
|
||||
|
@ -183,8 +193,18 @@ void PPBloom::UpdateBlurSteps()
|
|||
{
|
||||
auto &level = levels[i];
|
||||
auto &next = levels[i + 1];
|
||||
|
||||
steps.Push(BlurStep(blurUniforms, level.VTexture, level.HTexture, level.Viewport, false));
|
||||
steps.Push(BlurStep(blurUniforms, level.HTexture, next.VTexture, next.Viewport, true));
|
||||
steps.Push(BlurStep(blurUniforms, level.HTexture, level.VTexture, level.Viewport, true));
|
||||
|
||||
// Linear downscale:
|
||||
step.ShaderName = "BloomCombine";
|
||||
step.Uniforms.Clear();
|
||||
step.Viewport = next.Viewport;
|
||||
step.SetInputTexture(0, level.VTexture, PPFilterMode::Linear);
|
||||
step.SetOutputTexture(next.VTexture);
|
||||
step.SetNoBlend();
|
||||
steps.Push(step);
|
||||
}
|
||||
|
||||
// Blur and upscale:
|
||||
|
|
Loading…
Reference in a new issue