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 FxProcessor fx;
private WindowedMean renderTimes = new WindowedMean(20); private WindowedMean renderTimes = new WindowedMean(20);
private BloomFilter bloom; private BloomFilter bloom;
private boolean renderStencil = true;
private long lastFrameTime; private long lastFrameTime;
{ {
@ -45,7 +46,12 @@ public class LoadRenderer implements Disposable{
try{ try{
fx = new FxProcessor(Format.rgba8888, 2, 2, false, true); fx = new FxProcessor(Format.rgba8888, 2, 2, false, true);
}catch(Exception e){ }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 //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, rad);
Lines.poly(w/2, h/2, 4, rad2); Lines.poly(w/2, h/2, 4, rad2);
if(assets.isLoaded("tech")){ if(assets.isLoaded("tech") && renderStencil){
Font font = assets.get("tech"); Font font = assets.get("tech");
font.getData().markupEnabled = true; font.getData().markupEnabled = true;

View File

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