From 5990e7802c84b3f407de3934a1d75721115d1da7 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 13 Mar 2015 16:35:02 -0400 Subject: Fixed bug with blitting transparent textures Also moved player in front of checkpoint --- shaders/blit.fragment | 3 ++- src/game.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shaders/blit.fragment b/shaders/blit.fragment index 2d412c0..d2e9e46 100644 --- a/shaders/blit.fragment +++ b/shaders/blit.fragment @@ -9,5 +9,6 @@ uniform float alpha; void main() { - color = vec4(texture(srctex, UV).rgb, alpha); + vec4 texmex = texture(srctex, UV); + color = vec4(texmex.rgb, alpha * texmex.a); } diff --git a/src/game.cpp b/src/game.cpp index e2c1b9c..b149392 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -118,7 +118,6 @@ void Game::loadMap(const Map& map) nextEntities.clear(); nextEntities.push_back(mapEn); - nextEntities.push_back(player); // this is cheating but is just for testing if (&map == &m2) @@ -143,6 +142,8 @@ void Game::loadMap(const Map& map) nextEntities.push_back(saveEn); } + nextEntities.push_back(player); + newWorld = true; } -- cgit 1.4.1