combination fragment shader now uses exposure
This commit is contained in:
@@ -69,6 +69,7 @@ public class BloomShader implements Disposable {
|
||||
|
||||
combineShader.begin();
|
||||
combineShader.setUniformi("u_texture1", 1);
|
||||
combineShader.setUniformf("exposure", 0.5f);
|
||||
combineShader.end();
|
||||
|
||||
gaussianBlurShader.begin();
|
||||
@@ -124,26 +125,6 @@ public class BloomShader implements Disposable {
|
||||
screenBatch.flush();
|
||||
vBlur.end();
|
||||
|
||||
if (bloomLevel > 2) {
|
||||
// Horizontal gaussian blur
|
||||
fboRegion.setTexture(vBlur.getColorBufferTexture());
|
||||
hBlur.begin();
|
||||
gaussianBlurShader.setUniformf("radius", 1.1f);
|
||||
gaussianBlurShader.setUniformi("pass", 0);
|
||||
screenBatch.draw(fboRegion, 0f, 0f, width, height);
|
||||
screenBatch.flush();
|
||||
hBlur.end();
|
||||
|
||||
|
||||
// //Vertical gaussian blur
|
||||
fboRegion.setTexture(hBlur.getColorBufferTexture());
|
||||
vBlur.begin();
|
||||
gaussianBlurShader.setUniformi("pass", 1);
|
||||
screenBatch.draw(fboRegion, 0f, 0f, width, height);
|
||||
screenBatch.flush();
|
||||
vBlur.end();
|
||||
}
|
||||
|
||||
Gdx.gl.glClearColor(0f, 0f, 0f, 1f);
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
||||
screenBatch.setShader(combineShader);
|
||||
|
Reference in New Issue
Block a user