shader now works and alpha multiplying issue is fixed
This commit is contained in:
		@@ -147,7 +147,7 @@ timeline5: 1.0
 | 
			
		||||
attached: false
 | 
			
		||||
continuous: true
 | 
			
		||||
aligned: false
 | 
			
		||||
additive: false
 | 
			
		||||
additive: true
 | 
			
		||||
behind: false
 | 
			
		||||
premultipliedAlpha: false
 | 
			
		||||
- Image Path -
 | 
			
		||||
 
 | 
			
		||||
@@ -131,17 +131,14 @@ public class GamePlayArea extends Stage {
 | 
			
		||||
			getBatch().setBlendFunction(-1, -1);
 | 
			
		||||
			Gdx.gl20.glBlendFuncSeparate(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA,GL20.GL_ONE, GL20.GL_DST_ALPHA);
 | 
			
		||||
			getBatch().setShader(null);
 | 
			
		||||
			
 | 
			
		||||
			// use -1 to ignore.. somebody should fix this in LibGDX :\
 | 
			
		||||
			getBatch().setBlendFunction(-1, -1);
 | 
			
		||||
			// setup our alpha blending to avoid blending twice
 | 
			
		||||
			Gdx.gl20.glBlendFuncSeparate(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA, GL20.GL_ONE, GL20.GL_ONE);
 | 
			
		||||
			super.draw();
 | 
			
		||||
 | 
			
		||||
			blurTarget.end(getViewport().getScreenX(), getViewport().getScreenY(), getViewport().getScreenWidth(), getViewport().getScreenHeight());
 | 
			
		||||
			getBatch().setBlendFunction(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
			
 | 
			
		||||
			
 | 
			
		||||
			getBatch().setBlendFunction(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA);
 | 
			
		||||
			getBatch().begin();
 | 
			
		||||
//			getBatch().setShader(glowShader);
 | 
			
		||||
			getBatch().setShader(glowShader);
 | 
			
		||||
			getBatch().draw(fboRegion, 0f, 0f, Polyjet.GAME_AREA_WIDTH, Polyjet.GAME_AREA_HEIGHT);
 | 
			
		||||
			getBatch().setShader(null);
 | 
			
		||||
			getBatch().end();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user