mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
blur can be turned off using config file
This commit is contained in:
@@ -83,7 +83,7 @@ object DefaultConfig {
|
||||
|
||||
"pcgamepadenv" to "console",
|
||||
|
||||
//jsonObject.writeValue("safetywarning" to true,
|
||||
//"safetywarning" to true,
|
||||
|
||||
|
||||
"maxparticles" to 768,
|
||||
@@ -94,6 +94,7 @@ object DefaultConfig {
|
||||
// "fancy" graphics settings
|
||||
"fxdither" to true,
|
||||
"fxretro" to false,
|
||||
"fxblurredbackground" to true,
|
||||
//"fx3dlut" to false,
|
||||
|
||||
|
||||
|
||||
@@ -55,13 +55,15 @@ class UIFakeBlurOverlay(val blurRadius: Float, val nodarken: Boolean) : UICanvas
|
||||
|
||||
override var openCloseTime: Second = 0f
|
||||
|
||||
private val shaderBlur = App.loadShaderFromFile("assets/blur.vert", "assets/blur2.frag")
|
||||
private val shaderBlur = App.loadShaderFromFile("assets/blur.vert", "assets/blur.frag")
|
||||
|
||||
private val darken = Color(0.5f, 0.5f, 0.5f, 1f)
|
||||
|
||||
override fun updateUI(delta: Float) {}
|
||||
override fun renderUI(batch: SpriteBatch, camera: Camera) {
|
||||
Toolkit.blurEntireScreen(batch, camera as OrthographicCamera, blurRadius, 0, 0, width, height)
|
||||
if (App.getConfigBoolean("fxblurredbackground")) {
|
||||
Toolkit.blurEntireScreen(batch, camera as OrthographicCamera, blurRadius, 0, 0, width, height)
|
||||
}
|
||||
|
||||
if (!nodarken) {
|
||||
blendMul(batch)
|
||||
|
||||
Reference in New Issue
Block a user