summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-10-19 11:51:25 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-10-19 11:51:25 +0800
commitbf2657806313abf867865c62bcbfcf2172a7170c (patch)
treeb860cd3c5c744dac1e44e069a8368f1452a418c7
parenta3115e3062811781039b27e8051eaacf3caada9f (diff)
downloadvignetting-bf2657806313abf867865c62bcbfcf2172a7170c.tar.gz
vignetting-bf2657806313abf867865c62bcbfcf2172a7170c.tar.bz2
Make vignetting texture more transparent with window
-rw-r--r--src/vignetting.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vignetting.cpp b/src/vignetting.cpp
index 7d8df81..662b2d1 100644
--- a/src/vignetting.cpp
+++ b/src/vignetting.cpp
@@ -159,7 +159,8 @@ VigWindow::glDraw (const GLMatrix &transform,
{
/* Set the opacity of the vignette render to
* the opposite of the real brightness of the window */
- fragment.setOpacity (OPAQUE - brightness);
+ fragment.setOpacity ((OPAQUE - brightness) *
+ (fragment.getOpacity () / OPAQUE));
/* Texture rendering set-up */
vs->gScreen->setTexEnvMode (GL_MODULATE);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);