Removed _EXPERIMENTAL_ from waterripple as it is very stable..

also made the cvar a multiplier (the old multiplier was 8), defaults
to 0.  The cvs2cl changelog should just be whitespace changes, whoops.
This commit is contained in:
Eric Windisch 2000-01-18 03:38:04 +00:00
parent 3f74fe38b8
commit 14168f693a
4 changed files with 11 additions and 14 deletions

View file

@ -198,8 +198,8 @@ void R_Init (void)
Cvar_RegisterVariable (&r_waterwarp);
#ifdef _EXPERIMENTAL_
Cvar_RegisterVariable (&r_volfog);
Cvar_RegisterVariable (&r_waterripple);
#endif
Cvar_RegisterVariable (&r_waterripple);
Cvar_RegisterVariable (&gl_clear);
Cvar_RegisterVariable (&gl_texsort);

View file

@ -431,6 +431,11 @@ void GL_Init (void)
glAlphaFunc(GL_GREATER, 0.666);
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
/* glShadeMode(GL_SMOOTH) should look better then GL_FLAT but
I don't know if it looks any better, sure is slower
glShadeModel (GL_SMOOTH);
*/
glShadeModel (GL_FLAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

View file

@ -198,9 +198,7 @@ EmitWaterPolys ( msurface_t *fa ) {
float *v;
int i;
float s, t, os, ot;
#ifdef _EXPERIMENTAL_
vec3_t nv;
#endif
for (p=fa->polys ; p ; p=p->next) {
glBegin (GL_POLYGON);
@ -216,18 +214,14 @@ EmitWaterPolys ( msurface_t *fa ) {
glTexCoord2f (s, t);
#ifdef _EXPERIMENTAL_
nv[0] = v[0]; //+ 8*sin(v[1]*0.05+realtime)*sin(v[2]*0.05+realtime);
nv[1] = v[1]; //+ 8*sin(v[0]*0.05+realtime)*sin(v[2]*0.05+realtime);
if(r_waterripple.value) {
nv[2] = v[2] + 8*sin(v[0]*0.05+realtime)*sin(v[2]*0.05+realtime);
nv[0] = v[0]; //+8*sin(v[1]*0.05+realtime)*sin(v[2]*0.05+realtime);
nv[1] = v[1]; //+8*sin(v[0]*0.05+realtime)*sin(v[2]*0.05+realtime);
nv[2] = v[2] + r_waterripple.value*sin(v[0]*0.05+realtime)*sin(v[2]*0.05+realtime);
glVertex3fv (nv);
} else {
nv[2] = v[2];
glVertex3fv (v);
}
glVertex3fv (nv);
#else
glVertex3fv (v);
#endif // _EXPERIMENTAL_
}
glEnd ();
}

View file

@ -217,9 +217,7 @@ extern cvar_t r_netgraph;
extern cvar_t r_fog;
extern cvar_t r_waterwarp;
extern cvar_t r_volfog;
#ifdef _EXPERIMENTAL_
extern cvar_t r_waterripple;
#endif
extern cvar_t gl_clear;
extern cvar_t gl_cull;