1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-20 04:47:54 +03:00

Stencil buffer fallback

This commit is contained in:
Anuken 2021-06-18 15:14:08 -04:00
parent 5f0ec79b0f
commit 7ab0c86978
2 changed files with 9 additions and 3 deletions

View File

@ -38,6 +38,7 @@ public class LoadRenderer implements Disposable{
private FxProcessor fx;
private WindowedMean renderTimes = new WindowedMean(20);
private BloomFilter bloom;
private boolean renderStencil = true;
private long lastFrameTime;
{
@ -45,7 +46,12 @@ public class LoadRenderer implements Disposable{
try{
fx = new FxProcessor(Format.rgba8888, 2, 2, false, true);
}catch(Exception e){
fx = new FxProcessor(Format.rgb565, 2, 2, false, true);
try{
fx = new FxProcessor(Format.rgb565, 2, 2, false, true);
}catch(Exception awful){
renderStencil = false;
fx = new FxProcessor(Format.rgba8888, 2, 2, false, false);
}
}
//vignetting is probably too much
@ -179,7 +185,7 @@ public class LoadRenderer implements Disposable{
Lines.poly(w/2, h/2, 4, rad);
Lines.poly(w/2, h/2, 4, rad2);
if(assets.isLoaded("tech")){
if(assets.isLoaded("tech") && renderStencil){
Font font = assets.get("tech");
font.getData().markupEnabled = true;

View File

@ -10,4 +10,4 @@ kapt.include.compile.classpath=false
kotlin.stdlib.default.dependency=false
#needed for android compilation
android.useAndroidX=true
archash=283f2b76f419fc157312b26b1f1eff0de83898e1
archash=fa51fd94b73e08998a1fa184d3b1782f6f08aa8c