From: havoc Date: Thu, 8 Sep 2005 09:08:45 +0000 (+0000) Subject: removed GF3 water shader (entirely), it probably won't be coming back X-Git-Tag: xonotic-v0.1.0preview~4578 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e3b0cf4495e30fb814a65a370e9d36dbeb5c6a5e;p=xonotic%2Fdarkplaces.git removed GF3 water shader (entirely), it probably won't be coming back git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5697 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 49004019..fb0821df 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -97,7 +97,6 @@ cvar_t r_textureunits = {0, "r_textureunits", "32"}; cvar_t r_lerpsprites = {CVAR_SAVE, "r_lerpsprites", "1"}; cvar_t r_lerpmodels = {CVAR_SAVE, "r_lerpmodels", "1"}; cvar_t r_waterscroll = {CVAR_SAVE, "r_waterscroll", "1"}; -cvar_t r_watershader = {CVAR_SAVE, "r_watershader", "1"}; cvar_t r_bloom = {CVAR_SAVE, "r_bloom", "0"}; cvar_t r_bloom_intensity = {CVAR_SAVE, "r_bloom_intensity", "2"}; @@ -508,7 +507,6 @@ void GL_Main_Init(void) Cvar_RegisterVariable(&r_lerpsprites); Cvar_RegisterVariable(&r_lerpmodels); Cvar_RegisterVariable(&r_waterscroll); - Cvar_RegisterVariable(&r_watershader); Cvar_RegisterVariable(&r_drawcollisionbrushes); Cvar_RegisterVariable(&r_bloom); Cvar_RegisterVariable(&r_bloom_intensity); @@ -1818,43 +1816,6 @@ static void R_DrawTextureSurfaceList(const entity_render_t *ent, texture_t *text GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 1); } } - else if ((texture->currentmaterialflags & MATERIALFLAG_WATER) && r_watershader.value && gl_textureshader && !texture->skin.glow && !fogenabled && ent->colormod[0] == 1 && ent->colormod[1] == 1 && ent->colormod[2] == 1) - { - // NVIDIA Geforce3 distortion texture shader on water - float args[4] = {0.05f,0,0,0.04f}; - memset(&m, 0, sizeof(m)); - m.tex[0] = R_GetTexture(r_texture_distorttexture[(int)(r_refdef.time * 16)&63]); - m.tex[1] = R_GetTexture(texture->skin.base); - m.texcombinergb[0] = GL_REPLACE; - m.texcombinergb[1] = GL_REPLACE; - Matrix4x4_CreateFromQuakeEntity(&m.texmatrix[0], 0, 0, 0, 0, 0, 0, r_watershader.value); - m.texmatrix[1] = texture->currenttexmatrix; - R_Mesh_State(&m); - - GL_Color(1, 1, 1, texture->currentalpha); - GL_ActiveTexture(0); - qglTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_2D); - GL_ActiveTexture(1); - qglTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_OFFSET_TEXTURE_2D_NV); - qglTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB); - qglTexEnvfv(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_MATRIX_NV, &args[0]); - qglEnable(GL_TEXTURE_SHADER_NV); - - for (texturesurfaceindex = 0;texturesurfaceindex < texturenumsurfaces;texturesurfaceindex++) - { - surface = texturesurfacelist[texturesurfaceindex]; - RSurf_SetVertexPointer(ent, texture, surface, modelorg); - R_Mesh_TexCoordPointer(0, 2, surface->groupmesh->data_texcoordtexture2f); - R_Mesh_TexCoordPointer(1, 2, surface->groupmesh->data_texcoordtexture2f); - GL_LockArrays(surface->num_firstvertex, surface->num_vertices); - R_Mesh_Draw(surface->num_firstvertex, surface->num_vertices, surface->num_triangles, (surface->groupmesh->data_element3i + 3 * surface->num_firsttriangle)); - GL_LockArrays(0, 0); - } - - qglDisable(GL_TEXTURE_SHADER_NV); - qglTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_2D); - GL_ActiveTexture(0); - } else if (texture->currentmaterialflags & (MATERIALFLAG_WATER | MATERIALFLAG_WALL)) { // normal surface (wall or water) diff --git a/menu.c b/menu.c index 89d4c77a..10596838 100644 --- a/menu.c +++ b/menu.c @@ -1761,7 +1761,7 @@ void M_Options_Key (int k, char ascii) } } -#define OPTIONS_EFFECTS_ITEMS 37 +#define OPTIONS_EFFECTS_ITEMS 36 int options_effects_cursor; @@ -1833,7 +1833,6 @@ void M_Menu_Options_Effects_AdjustSliders (int dir) else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_waterwarp, bound(0, r_waterwarp.value + dir * 0.1, 1)); else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_wateralpha, bound(0, r_wateralpha.value + dir * 0.1, 1)); else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_waterscroll, bound(0, r_waterscroll.value + dir * 0.5, 10)); - else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_watershader, bound(0, r_watershader.value + dir * 0.25, 10)); } void M_Options_Effects_Draw (void) @@ -1888,7 +1887,6 @@ void M_Options_Effects_Draw (void) M_Options_PrintSlider( " Underwater View Warp", true, r_waterwarp.value, 0, 1); M_Options_PrintSlider( " Water Alpha (opacity)", true, r_wateralpha.value, 0, 1); M_Options_PrintSlider( " Water Movement", true, r_waterscroll.value, 0, 10); - M_Options_PrintSlider( " GeForce3 Water Shader", true, r_watershader.value, 0, 10); } diff --git a/r_shadow.c b/r_shadow.c index f42ddc56..45ce01fc 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -328,7 +328,7 @@ const char *builtinshader_light_frag = "// ambient+diffuse+specular+normalmap+attenuation+cubemap+fog shader\n" "// written by Forest 'LordHavoc' Hale\n" "\n" -"// use half floats on GEFORCEFX for math performance, otherwise don't\n" +"// use half floats if available for math performance\n" "#ifndef GEFORCEFX\n" "#define half float\n" "#define hvec2 vec2\n" @@ -1613,7 +1613,6 @@ static void R_Shadow_RenderSurfacesLighting_Light_GLSL(const entity_render_t *en qboolean doambientshirt = r_shadow_rtlight->ambientscale * VectorLength2(lightcolorshirt) > 0.00001 && shirttexture != r_texture_black; qboolean dodiffuseshirt = r_shadow_rtlight->diffusescale * VectorLength2(lightcolorshirt) > 0.00001 && shirttexture != r_texture_black; qboolean dospecular = specularscale * VectorLength2(lightcolorbase) > 0.00001 && glosstexture != r_texture_black; - //qboolean dowatershader = (texture->currentmaterialflags & MATERIALFLAG_WATER) && r_watershader.value; // TODO: add direct pants/shirt rendering if (doambientpants || dodiffusepants) R_Shadow_RenderSurfacesLighting_Light_GLSL(ent, texture, numsurfaces, surfacelist, lightcolorpants, vec3_origin, vec3_origin, pantstexture, r_texture_black, r_texture_black, normalmaptexture, r_texture_black, 0, modelorg); diff --git a/render.h b/render.h index 689ba438..28d2cf69 100644 --- a/render.h +++ b/render.h @@ -74,7 +74,6 @@ extern cvar_t r_detailtextures; extern cvar_t r_lerpsprites; extern cvar_t r_lerpmodels; extern cvar_t r_waterscroll; -extern cvar_t r_watershader; extern cvar_t developer_texturelogging;