mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 10:04:05 +09:00
blur can be turned off using config file
This commit is contained in:
@@ -83,7 +83,7 @@ object DefaultConfig {
|
|||||||
|
|
||||||
"pcgamepadenv" to "console",
|
"pcgamepadenv" to "console",
|
||||||
|
|
||||||
//jsonObject.writeValue("safetywarning" to true,
|
//"safetywarning" to true,
|
||||||
|
|
||||||
|
|
||||||
"maxparticles" to 768,
|
"maxparticles" to 768,
|
||||||
@@ -94,6 +94,7 @@ object DefaultConfig {
|
|||||||
// "fancy" graphics settings
|
// "fancy" graphics settings
|
||||||
"fxdither" to true,
|
"fxdither" to true,
|
||||||
"fxretro" to false,
|
"fxretro" to false,
|
||||||
|
"fxblurredbackground" to true,
|
||||||
//"fx3dlut" to false,
|
//"fx3dlut" to false,
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,13 +55,15 @@ class UIFakeBlurOverlay(val blurRadius: Float, val nodarken: Boolean) : UICanvas
|
|||||||
|
|
||||||
override var openCloseTime: Second = 0f
|
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)
|
private val darken = Color(0.5f, 0.5f, 0.5f, 1f)
|
||||||
|
|
||||||
override fun updateUI(delta: Float) {}
|
override fun updateUI(delta: Float) {}
|
||||||
override fun renderUI(batch: SpriteBatch, camera: Camera) {
|
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) {
|
if (!nodarken) {
|
||||||
blendMul(batch)
|
blendMul(batch)
|
||||||
|
|||||||
Reference in New Issue
Block a user