diff --git a/src/hardware/hw_defs.h b/src/hardware/hw_defs.h index be77b3447..3c2e29a90 100644 --- a/src/hardware/hw_defs.h +++ b/src/hardware/hw_defs.h @@ -201,7 +201,6 @@ enum SHADER_SPRITE, SHADER_MODEL, SHADER_WATER, - SHADER_WAVE, SHADER_FOG, SHADER_SKY, SHADER_PALETTE_POSTPROCESS, @@ -264,7 +263,6 @@ enum EPolyFlags PF_ForceWrapX = 0x00020000, // Force repeat texture on X PF_ForceWrapY = 0x00040000, // Forces repeat texture on Y PF_Ripple = 0x00100000, // Water ripple effect. The current backend doesn't use it for anything. - PF_Wave = 0x00200000, // Water wave effect. PF_Skydecal = 0x20000000 // Enables smaller polygon offset, to be used for skywalls only // 0x20000000 // 0x40000000 diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 876ab61b1..c2a61836c 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -775,8 +775,6 @@ static void HWR_RenderPlane(subsector_t *subsector, poly_subsector_t *xsub, bool shader = SHADER_FOG; else if (cv_ripplewater.value && (PolyFlags & PF_Ripple)) shader = SHADER_WATER; - else if (cv_ripplewater.value && (PolyFlags & PF_Wave)) - shader = SHADER_WAVE; else shader = SHADER_FLOOR; @@ -2920,8 +2918,8 @@ static boolean HWR_DoCulling(line_t *cullheight, line_t *viewcullheight, float v static FBITFIELD HWR_RippleBlend(sector_t *sector, ffloor_t *rover, boolean ceiling) { (void)sector; - //(void)ceiling; - return /*R_IsRipplePlane(sector, rover, ceiling)*/ ((rover->flags & FF_RIPPLE) ? (ceiling ? PF_Wave : PF_Ripple) : 0); + (void)ceiling; + return /*R_IsRipplePlane(sector, rover, ceiling)*/ (rover->flags & FF_RIPPLE) ? PF_Ripple : 0; } // -----------------+ @@ -3081,7 +3079,7 @@ static void HWR_Subsector(size_t num) // rendering heights for bottom and top planes // yes there were functions for this stuff, no idea why it wasnt used but bleh bottomCullHeight = P_GetFFloorBottomZAt(rover, viewx, viewy); - topCullHeight = P_GetFFloorTopZAt(rover, viewx, viewy); + topCullHeight = P_GetFFloorTopZAt(rover, viewx, viewy); if (gl_frontsector->cullheight) { @@ -3167,7 +3165,7 @@ static void HWR_Subsector(size_t num) true, *rover->topheight, *gl_frontsector->lightlist[light].lightlevel, - CLAMP(rover->alpha, 0 ,255), rover->master->frontsector, HWR_RippleBlend(gl_frontsector, rover, *rover->topheight < rover->target->ceilingheight-(20*FRACUNIT) /*random offset that seems fitting ig*/) | (rover->blend ? HWR_GetBlendModeFlag(rover->blend) : static_cast(PF_Translucent)), + CLAMP(rover->alpha, 0 ,255), rover->master->frontsector, HWR_RippleBlend(gl_frontsector, rover, false) | (rover->blend ? HWR_GetBlendModeFlag(rover->blend) : static_cast(PF_Translucent)), false, gl_frontsector->lightlist[light].extra_colormap); } else @@ -3175,7 +3173,7 @@ static void HWR_Subsector(size_t num) HWR_GetFlat(levelflats[*rover->toppic].lumpnum, R_NoEncore(gl_frontsector, true)); light = R_GetPlaneLight(gl_frontsector, centerHeight, (viewz < topCullHeight)); - HWR_RenderPlane(sub, &poly_subsectors[num], true, *rover->topheight, HWR_RippleBlend(gl_frontsector, rover, *rover->topheight < rover->target->ceilingheight-(20*FRACUNIT))|PF_Occlude, *gl_frontsector->lightlist[light].lightlevel, levelflats[*rover->toppic].lumpnum, + HWR_RenderPlane(sub, &poly_subsectors[num], true, *rover->topheight, HWR_RippleBlend(gl_frontsector, rover, false)|PF_Occlude, *gl_frontsector->lightlist[light].lightlevel, levelflats[*rover->toppic].lumpnum, rover->master->frontsector, 255, gl_frontsector->lightlist[light].extra_colormap); } } diff --git a/src/hardware/hw_shaders.c b/src/hardware/hw_shaders.c index bb1731f40..bba4d1e3e 100644 --- a/src/hardware/hw_shaders.c +++ b/src/hardware/hw_shaders.c @@ -41,9 +41,6 @@ static struct { // Water shader {GLSL_DEFAULT_VERTEX_SHADER, GLSL_WATER_FRAGMENT_SHADER}, - // Water Wave shader - {GLSL_WAVE_VERTEX_SHADER, GLSL_WATER_FRAGMENT_SHADER}, - // Fog shader {GLSL_DEFAULT_VERTEX_SHADER, GLSL_FOG_FRAGMENT_SHADER}, diff --git a/src/hardware/hw_shaders.h b/src/hardware/hw_shaders.h index 8142e7056..fc3642b21 100644 --- a/src/hardware/hw_shaders.h +++ b/src/hardware/hw_shaders.h @@ -31,27 +31,6 @@ "gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex;\n" \ "}\0" -// adjust the amplitude for beeegger wäves on ze wöter -// this is pretty meh but idk what im doing lmao -#define GLSL_WAVE_VERTEX_SHADER \ - "uniform float leveltime;\n" \ - "const float waveSpeed = 2.5;\n" \ - "const float waveFrequency = 0.7;\n" \ - "const float waveAmplitude = 1.8;\n" \ - "void main()\n" \ - "{\n" \ - "vec4 modelPos = gl_Vertex;\n" \ - "float timeF = leveltime * waveSpeed;\n" \ - "float wave1 = sin(timeF) * waveAmplitude;\n" \ - "float wave2 = cos(timeF * 1.3) * waveAmplitude;\n" \ - "modelPos.y += wave1 + wave2;\n" \ - "vec4 worldPos = gl_ModelViewMatrix * modelPos;\n" \ - "gl_Position = gl_ProjectionMatrix * worldPos;\n" \ - "gl_FrontColor = gl_Color;\n" \ - "gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;\n" \ - "gl_ClipVertex = worldPos;\n" \ - "}\0" - // reinterpretation of sprite lighting for models // it's a combination of how it works for normal sprites & papersprites #define GLSL_MODEL_LIGHTING_VERTEX_SHADER \