Save vignette to config
This commit is contained in:
@@ -53,6 +53,7 @@ class Config {
|
||||
raw.window_vsync = true;
|
||||
raw.rp_bloom = false;
|
||||
raw.rp_gi = false;
|
||||
raw.rp_vignette = 0.4;
|
||||
raw.rp_motionblur = false;
|
||||
#if (krom_android || krom_ios)
|
||||
raw.rp_ssgi = false;
|
||||
|
||||
@@ -22,6 +22,7 @@ typedef TConfig = {
|
||||
@:optional var rp_bloom: Null<Bool>;
|
||||
@:optional var rp_motionblur: Null<Bool>;
|
||||
@:optional var rp_gi: Null<Bool>;
|
||||
@:optional var rp_vignette: Null<Float>;
|
||||
// Application
|
||||
@:optional var version: String; // ArmorPaint version
|
||||
@:optional var sha: String; // Commit id
|
||||
|
||||
@@ -226,7 +226,6 @@ class Context {
|
||||
#end
|
||||
public static var vxaoOffset = 1.5;
|
||||
public static var vxaoAperture = 1.2;
|
||||
public static var vignetteStrength = 0.4;
|
||||
public static var textureExportPath = "";
|
||||
public static var lastCombo: Handle = null;
|
||||
public static var lastTooltip: Image = null;
|
||||
|
||||
@@ -86,7 +86,7 @@ class Uniforms {
|
||||
#end
|
||||
if (link == "_vignetteStrength") {
|
||||
#if arm_painter
|
||||
return Context.vignetteStrength;
|
||||
return Config.raw.rp_vignette;
|
||||
#else
|
||||
return 0.4;
|
||||
#end
|
||||
|
||||
@@ -194,14 +194,17 @@ class BoxPreferences {
|
||||
#end
|
||||
ui.check(Context.hssgi, tr("SSAO"));
|
||||
if (Context.hssgi.changed) Config.applyConfig();
|
||||
ui.check(Context.hbloom, tr("Bloom"));
|
||||
if (Context.hbloom.changed) Config.applyConfig();
|
||||
ui.check(Context.hssr, tr("SSR"));
|
||||
if (Context.hssr.changed) Config.applyConfig();
|
||||
ui.check(Context.hbloom, tr("Bloom"));
|
||||
if (Context.hbloom.changed) Config.applyConfig();
|
||||
|
||||
var h = Id.handle({value: Context.vignetteStrength});
|
||||
Context.vignetteStrength = ui.slider(h, tr("Vignette"), 0.0, 1.0, true);
|
||||
if (h.changed) Context.ddirty = 2;
|
||||
var h = Id.handle({value: Config.raw.rp_vignette});
|
||||
Config.raw.rp_vignette = ui.slider(h, tr("Vignette"), 0.0, 1.0, true);
|
||||
if (h.changed) {
|
||||
Context.ddirty = 2;
|
||||
Config.save();
|
||||
}
|
||||
|
||||
// var h = Id.handle({value: Context.autoExposureStrength});
|
||||
// Context.autoExposureStrength = ui.slider(h, "Auto Exposure", 0.0, 2.0, true);
|
||||
|
||||
Reference in New Issue
Block a user