Re: [compiz] [PATCH] Water fixes
On 5/14/07, David Reveman <[EMAIL PROTECTED]> wrote: > It can give slightly different results depending on if the software or > hardware water simulation is used but it should be close enough to not > really matter. Here the FBO version was actually fine even with 40, but software rendering needed at most 35. > However, when I use your patch I see cases where I find > it to end the water simulation much too early. E.g. when you turn off > the rain effect and rain_delay is set to 1. Interesting, both fbo and software work fine here with 35. How is this machine dependent if the countdown and drawing is not time-based? Do the floats in the fragment program have different accuracy on different machines? Does the early ending happen with software rendering, too? Regards, Erkin ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] [PATCH] Water fixes
On Mon, 2007-05-14 at 15:07 -0500, Erkin Bahceci wrote: > On 5/14/07, David Reveman <[EMAIL PROTECTED]> wrote: > > Great, I've committed all patches except > > Stop-Water-drawing-right-after-waves-disappear as I'm not sure how you > > came to the conclusion that the count variable could be decremented at > > that rate. Did you make any calculations to come up with that or is it > > just based on testing on your machine? > > > Just by testing a few values. Since the decrement is happening where > the water update takes place (both independent of msSinceLastPaint), > it should work on any machine. Is it not the case? It can give slightly different results depending on if the software or hardware water simulation is used but it should be close enough to not really matter. However, when I use your patch I see cases where I find it to end the water simulation much too early. E.g. when you turn off the rain effect and rain_delay is set to 1. - David ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] [PATCH] Water fixes
On 5/14/07, David Reveman <[EMAIL PROTECTED]> wrote: > Great, I've committed all patches except > Stop-Water-drawing-right-after-waves-disappear as I'm not sure how you > came to the conclusion that the count variable could be decremented at > that rate. Did you make any calculations to come up with that or is it > just based on testing on your machine? Just by testing a few values. Since the decrement is happening where the water update takes place (both independent of msSinceLastPaint), it should work on any machine. Is it not the case? Regards, Erkin ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
Re: [compiz] [PATCH] Water fixes
On Sun, 2007-05-13 at 18:03 -0500, Erkin Bahceci wrote: > Hi, > > I had a look at some problems I saw in the Water plugin. Here are the > patches fixing those. > > The file names should be self-descriptive. Great, I've committed all patches except Stop-Water-drawing-right-after-waves-disappear as I'm not sure how you came to the conclusion that the count variable could be decremented at that rate. Did you make any calculations to come up with that or is it just based on testing on your machine? - David ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz
[compiz] [PATCH] Water fixes
Hi, I had a look at some problems I saw in the Water plugin. Here are the patches fixing those. The file names should be self-descriptive. Regards, Erkin From 450379b6f5bb60f18222cca0cceacab189b1f5e6 Mon Sep 17 00:00:00 2001 From: Erkin Bahceci <[EMAIL PROTECTED]> Date: Sat, 12 May 2007 18:36:28 -0500 Subject: [PATCH] Slightly speed up Water by replacing a SUB-MUL pair with MAD. --- plugins/water.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/plugins/water.c b/plugins/water.c index 00175cc..b906c1c 100644 --- a/plugins/water.c +++ b/plugins/water.c @@ -305,8 +305,7 @@ getBumpMapFragmentFunction (CompScreen *s, "MOV offset, normal;" /* remove scale and bias from normal */ - "SUB normal, normal, 0.5;" - "MUL normal, normal, 2.0;" + "MAD normal, normal, 2.0, -1.0;" /* normalize the normal map */ "DP3 temp, normal, normal;" -- 1.4.4.2 From a19016688a484e4052650d3d584cb6e08e5d61e4 Mon Sep 17 00:00:00 2001 From: Erkin Bahceci <[EMAIL PROTECTED]> Date: Sun, 13 May 2007 14:26:14 -0500 Subject: [PATCH] Stop Water drawing right after waves disappear to avoid unnecessary extended cpu/gpu use for the following 10 or so seconds. --- plugins/water.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/water.c b/plugins/water.c index b906c1c..e4a798e 100644 --- a/plugins/water.c +++ b/plugins/water.c @@ -1114,7 +1114,7 @@ waterPreparePaintScreen (CompScreen *s, if (ws->count) { - ws->count -= 10; + ws->count -= 35; if (ws->count < 0) ws->count = 0; -- 1.4.4.2 From 2aaad634598ccc873c5468aa951a7c541632630b Mon Sep 17 00:00:00 2001 From: Erkin Bahceci <[EMAIL PROTECTED]> Date: Sun, 13 May 2007 15:42:53 -0500 Subject: [PATCH] Fix white skydome problem when Water is active. --- plugins/water.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/plugins/water.c b/plugins/water.c index e4a798e..4a7caca 100644 --- a/plugins/water.c +++ b/plugins/water.c @@ -415,6 +415,8 @@ allocTexture (CompScreen *s, #endif ws->t0); + +glBindTexture (ws->target, 0); } static int @@ -547,14 +549,16 @@ fboUpdate (CompScreen *s, glDisable (GL_FRAGMENT_PROGRAM_ARB); -glBindTexture (ws->target, 0); glTexParameteri (ws->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri (ws->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); +glBindTexture (ws->target, 0); (*s->activeTexture) (GL_TEXTURE0_ARB); glTexParameteri (ws->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri (ws->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glBindTexture (ws->target, 0); +glDisable (ws->target); + fboEpilogue (s); /* increment texture index */ -- 1.4.4.2 From 83a42f81b9f9fd4d29b2dce5a2c58ffe074c Mon Sep 17 00:00:00 2001 From: Erkin Bahceci <[EMAIL PROTECTED]> Date: Sun, 13 May 2007 16:11:33 -0500 Subject: [PATCH] Center title wave starting y (was 1/4 below). --- plugins/water.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/water.c b/plugins/water.c index 4a7caca..0c57d91 100644 --- a/plugins/water.c +++ b/plugins/water.c @@ -1396,7 +1396,7 @@ waterTitleWave (CompDisplay *d, XPoint p[2]; p[0].x = w->attrib.x - w->input.left; - p[0].y = w->attrib.y - (w->input.top >> 2); + p[0].y = w->attrib.y - w->input.top / 2; p[1].x = w->attrib.x + w->width + w->input.right; p[1].y = p[0].y; -- 1.4.4.2 ___ compiz mailing list compiz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/compiz