From ccbb894a6ba9b70aa6f9e548b71e260f9c531311 Mon Sep 17 00:00:00 2001 From: Indev Date: Thu, 16 Nov 2023 21:16:56 +0300 Subject: [PATCH] Remove repeating code in VHS effect --- src/hardware/r_opengl/r_opengl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index ed083307e..d558a0834 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -4185,12 +4185,10 @@ EXPORT void HWRAPI(RenderVhsEffect) (fixed_t upbary, fixed_t downbary, UINT8 upd SetBlend(PF_Modulated|PF_Translucent|PF_NoDepthTest); pglBindTexture(GL_TEXTURE_2D, screentexture); - fix[2] = (float)(rand() % 128) / -22000 * xfix; - for (i = 0; i < 1; i += 2.f/vid.height) { - fix[0] = fix[2]; fix[2] = (float)(rand() % 128) / -22000 * xfix; + fix[0] = fix[2]; fix[6] = fix[0] + xfix; fix[4] = fix[2] + xfix; fix[1] = fix[7] = i*yfix;