minor progress on background shader
This commit is contained in:
@@ -128,6 +128,8 @@ public class Polyjet extends Game {
|
||||
assetManager.load("shard.png", Texture.class);
|
||||
assetManager.load("bar.png", Texture.class);
|
||||
assetManager.load("flake.png", Texture.class);
|
||||
assetManager.load("star_bg.png", Texture.class);
|
||||
// assetManager.load("");
|
||||
}
|
||||
public void generateFonts() {
|
||||
initComplete = true;
|
||||
|
@@ -32,8 +32,6 @@ public class GamePlayArea extends Stage {
|
||||
private ShaderProgram invert;
|
||||
private ShaderProgram bgShader;
|
||||
|
||||
private Vector2 resolution;
|
||||
|
||||
private float timePassed;
|
||||
|
||||
private Texture background;
|
||||
@@ -83,7 +81,6 @@ public class GamePlayArea extends Stage {
|
||||
if (bgShader.getLog().length()!=0) {
|
||||
System.out.println(bgShader.getLog());
|
||||
}
|
||||
resolution = new Vector2(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
|
||||
} else {
|
||||
//TODO prepare background rendering without shader
|
||||
}
|
||||
@@ -110,8 +107,8 @@ public class GamePlayArea extends Stage {
|
||||
if (bgShader != null) {
|
||||
timePassed += delta;
|
||||
bgShader.setUniformf("time", timePassed);
|
||||
bgShader.setUniformf("resolution", resolution);
|
||||
}
|
||||
|
||||
collisionDetector.collisionCheck();
|
||||
ec.deathClean();
|
||||
|
||||
|
Reference in New Issue
Block a user