Bugfixes
This commit is contained in:
@@ -71,8 +71,8 @@ public class Shaders{
|
||||
setUniformf("u_rcampos", Tmp.v31.set(camera.position).sub(planet.position));
|
||||
setUniformf("u_light", planet.getLightNormal());
|
||||
setUniformf("u_color", planet.atmosphereColor.r, planet.atmosphereColor.g, planet.atmosphereColor.b);
|
||||
setUniformf("u_innerRadius", planet.radius + 0.02f);
|
||||
setUniformf("u_outerRadius", planet.radius * 1.3f);
|
||||
setUniformf("u_innerRadius", planet.radius + planet.atmosphereRadIn);
|
||||
setUniformf("u_outerRadius", planet.radius + planet.atmosphereRadOut);
|
||||
|
||||
setUniformMatrix4("u_model", planet.getTransform(mat).val);
|
||||
setUniformMatrix4("u_projection", camera.combined.val);
|
||||
|
||||
@@ -77,8 +77,6 @@ public class MeshBuilder{
|
||||
|
||||
if(c.length > 5){
|
||||
verts(c[0].v, c[4].v, c[5].v, nor, color);
|
||||
}else{
|
||||
verts(c[0].v, c[3].v, c[4].v, nor, color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ public class PlanetRenderer implements Disposable{
|
||||
camPos.set(0, 0f, camLength);
|
||||
projector.setScaling(1f / 150f);
|
||||
cam.fov = 60f;
|
||||
cam.far = 150f;
|
||||
}
|
||||
|
||||
/** Render the entire planet scene to the screen. */
|
||||
@@ -93,6 +94,8 @@ public class PlanetRenderer implements Disposable{
|
||||
|
||||
renderPlanet(solarSystem);
|
||||
|
||||
renderTransparent(solarSystem);
|
||||
|
||||
endBloom();
|
||||
|
||||
Events.fire(Trigger.universeDrawEnd);
|
||||
@@ -125,11 +128,21 @@ public class PlanetRenderer implements Disposable{
|
||||
|
||||
renderOrbit(planet);
|
||||
|
||||
for(Planet child : planet.children){
|
||||
renderPlanet(child);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderTransparent(Planet planet){
|
||||
if(!planet.visible()) return;
|
||||
|
||||
if(planet.isLandable() && planet == this.planet){
|
||||
renderSectors(planet);
|
||||
}
|
||||
|
||||
if(planet.parent != null && planet.hasAtmosphere && Core.settings.getBool("atmosphere")){
|
||||
Gl.depthMask(false);
|
||||
|
||||
Blending.additive.apply();
|
||||
|
||||
Shaders.atmosphere.camera = cam;
|
||||
@@ -140,10 +153,12 @@ public class PlanetRenderer implements Disposable{
|
||||
atmosphere.render(Shaders.atmosphere, Gl.triangles);
|
||||
|
||||
Blending.normal.apply();
|
||||
|
||||
Gl.depthMask(true);
|
||||
}
|
||||
|
||||
for(Planet child : planet.children){
|
||||
renderPlanet(child);
|
||||
renderTransparent(child);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user