uncap water effects
also caps software heatwave effect since it was sped up with interp note : waterofs was left out, due to it producing stutters on water surfaces in softwaremode
This commit is contained in:
1 parent
7b136a62c4
commit
7c6b03145d
4 files changed
+13
-10
No files matched your search
@@ -6378,7 +6378,7 @@ void HWR_DoPostProcessor(player_t *player)
|
||||
{
|
||||
// 10 by 10 grid. 2 coordinates (xy)
|
||||
float v[SCREENVERTS][SCREENVERTS][2];
|
||||
static double disStart = 0;
|
||||
float disStart = (leveltime-1) + FIXED_TO_FLOAT(rendertimefrac);
|
||||
|
||||
UINT8 x, y;
|
||||
INT32 WAVELENGTH;
|
||||
@@ -6409,8 +6409,6 @@ void HWR_DoPostProcessor(player_t *player)
|
||||
}
|
||||
}
|
||||
HWD.pfnPostImgRedraw(v);
|
||||
if (!(paused || P_AutoPause()))
|
||||
disStart += FIXED_TO_FLOAT(renderdeltatics);
|
||||
|
||||
// Capture the screen again for screen waving on the intermission
|
||||
if(gamestate != GS_INTERMISSION)
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
#include "../../r_local.h" // For rendertimefrac, used for the leveltime shader uniform
|
||||
#include "r_opengl.h"
|
||||
#include "r_vbo.h"
|
||||
|
||||
@@ -668,7 +669,7 @@ typedef struct gl_shaderprogram_s
|
||||
static gl_shaderprogram_t gl_shaderprograms[MAXSHADERPROGRAMS];
|
||||
|
||||
// Shader info
|
||||
static INT32 shader_leveltime = 0;
|
||||
static float shader_leveltime = 0;
|
||||
|
||||
// ========================
|
||||
// Fragment shader macros
|
||||
@@ -1201,7 +1202,7 @@ EXPORT void HWRAPI(SetShaderInfo) (hwdshaderinfo_t info, INT32 value)
|
||||
switch (info)
|
||||
{
|
||||
case HWD_SHADERINFO_LEVELTIME:
|
||||
shader_leveltime = value;
|
||||
shader_leveltime = (((float)(value-1)) + FIXED_TO_FLOAT(rendertimefrac)) / TICRATE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2212,7 +2213,7 @@ static void Shader_SetUniforms(FSurfaceInfo *Surface, GLRGBAFloat *poly, GLRGBAF
|
||||
UNIFORM_1(shader->uniforms[gluniform_fade_start], Surface->LightInfo.fade_start, pglUniform1f);
|
||||
UNIFORM_1(shader->uniforms[gluniform_fade_end], Surface->LightInfo.fade_end, pglUniform1f);
|
||||
}
|
||||
UNIFORM_1(shader->uniforms[gluniform_leveltime], ((float)shader_leveltime) / TICRATE, pglUniform1f);
|
||||
UNIFORM_1(shader->uniforms[gluniform_leveltime], shader_leveltime, pglUniform1f);
|
||||
|
||||
#undef UNIFORM_1
|
||||
#undef UNIFORM_2
|
||||
|
||||
+1
-1
@@ -698,7 +698,7 @@ void R_DrawPlanes(void)
|
||||
}
|
||||
#ifndef NOWATER
|
||||
waterofs = (leveltime & 1)*16384;
|
||||
wtofs = leveltime * 140;
|
||||
wtofs = ((leveltime-1)*140) + ((rendertimefrac*140) / FRACUNIT);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
+7
-3
@@ -2645,7 +2645,8 @@ void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param)
|
||||
UINT8 *tmpscr = screens[4];
|
||||
UINT8 *srcscr = screens[0];
|
||||
INT32 y;
|
||||
angle_t disStart = (leveltime * 128) & FINEMASK; // in 0 to FINEANGLE
|
||||
// Set disStart to a range from 0 to FINEANGLE, incrementing by 128 per tic
|
||||
angle_t disStart = (((leveltime-1)*128) + (rendertimefrac / (FRACUNIT/128))) & FINEMASK;
|
||||
INT32 newpix;
|
||||
INT32 sine;
|
||||
//UINT8 *transme = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
@@ -2768,8 +2769,11 @@ Unoptimized version
|
||||
heatindex[view] %= viewheight;
|
||||
}
|
||||
|
||||
heatindex[view]++;
|
||||
heatindex[view] %= vid.height;
|
||||
if (renderisnewtic) // This isn't interpolated... but how do you interpolate a one-pixel shift?
|
||||
{
|
||||
heatindex[view]++;
|
||||
heatindex[view] %= vid.height;
|
||||
}
|
||||
|
||||
VID_BlitLinearScreen(tmpscr+vid.width*vid.bpp*yoffset+xoffset, screens[0]+vid.width*vid.bpp*yoffset+xoffset,
|
||||
viewwidth*vid.bpp, viewheight, vid.width*vid.bpp, vid.width);
|
||||
|
||||
Reference in new issue
Block a user