- fixed dither math.

This commit is contained in:
Christoph Oelckers 2018-08-11 09:27:35 +02:00
commit 19a5a2fd2b
2 changed files with 3 additions and 3 deletions

View file

@ -163,7 +163,7 @@ static void prepareInterleavedPresent(FPresentShaderBase& shader)
shader.Uniforms->Saturation = clamp<float>(vid_saturation, -15.0f, 15.0f);
shader.Uniforms->GrayFormula = static_cast<int>(gl_satformula);
}
shader.Uniforms->ColorScale = (gl_dither_bpc == -1) ? 255.0f : (float)(1 << gl_dither_bpc - 1);
shader.Uniforms->ColorScale = (gl_dither_bpc == -1) ? 255.0f : (float)((1 << gl_dither_bpc) - 1);
shader.Uniforms->Scale = {
screen->mScreenViewport.width / (float)GLRenderer->mBuffers->GetWidth(),
screen->mScreenViewport.height / (float)GLRenderer->mBuffers->GetHeight()