Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
Conflicts: core/src/mindustry/ui/dialogs/PlanetDialog.java
This commit is contained in:
@@ -235,7 +235,7 @@ public class Shaders{
|
||||
super(frag);
|
||||
|
||||
Core.assets.load("sprites/space.png", Texture.class).loaded = t -> {
|
||||
texture = (Texture)t;
|
||||
texture = t;
|
||||
texture.setFilter(TextureFilter.linear);
|
||||
texture.setWrap(TextureWrap.mirroredRepeat);
|
||||
};
|
||||
@@ -274,8 +274,8 @@ public class Shaders{
|
||||
|
||||
public void loadNoise(){
|
||||
Core.assets.load("sprites/" + textureName() + ".png", Texture.class).loaded = t -> {
|
||||
((Texture)t).setFilter(TextureFilter.linear);
|
||||
((Texture)t).setWrap(TextureWrap.repeat);
|
||||
t.setFilter(TextureFilter.linear);
|
||||
t.setWrap(TextureWrap.repeat);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -136,8 +136,12 @@ public class PlanetRenderer implements Disposable{
|
||||
public void renderPlanet(Planet planet){
|
||||
if(!planet.visible()) return;
|
||||
|
||||
//render planet at offsetted position in the world
|
||||
planet.draw(cam.combined, planet.getTransform(mat));
|
||||
cam.update();
|
||||
|
||||
if(cam.frustum.containsSphere(planet.position, planet.clipRadius)){
|
||||
//render planet at offsetted position in the world
|
||||
planet.draw(cam.combined, planet.getTransform(mat));
|
||||
}
|
||||
|
||||
for(Planet child : planet.children){
|
||||
renderPlanet(child);
|
||||
@@ -151,7 +155,7 @@ public class PlanetRenderer implements Disposable{
|
||||
renderSectors(planet);
|
||||
}
|
||||
|
||||
if(planet.parent != null && planet.hasAtmosphere && Core.settings.getBool("atmosphere")){
|
||||
if(cam.frustum.containsSphere(planet.position, planet.clipRadius) && planet.parent != null && planet.hasAtmosphere && Core.settings.getBool("atmosphere")){
|
||||
Gl.depthMask(false);
|
||||
|
||||
Blending.additive.apply();
|
||||
|
||||
Reference in New Issue
Block a user