diff --git a/menudef.txt b/menudef.txt index fb5be4a..923d318 100644 --- a/menudef.txt +++ b/menudef.txt @@ -3,13 +3,14 @@ OptionValue "Nice_Modes" { 1, "Subtract" 2, "Compress" 3, "Clamp" + 4, "Crush" 10, "DarkDoom Lite" 11, "DarkDoom Classic" 12, "DarkDoom Black" } OptionValue "Nice_Settings" { - //0, "Disable" + 0, "Disable" 1, "Dim" 2, "Murky" 3, "Dismal" diff --git a/zscript.zsc b/zscript.zsc index f00ad30..a0f5284 100644 --- a/zscript.zsc +++ b/zscript.zsc @@ -67,7 +67,7 @@ class DarkDoomZ_SectorLightAdjust : EventHandler { if(IsSky) FinalAdjustment *= (0.5 * SkyMode); // Link to graphing calculator depiction of different modes - // https://www.desmos.com/calculator/iphz6pi8yj + // https://www.desmos.com/calculator/n1lvnyceve switch(Mode) { case 1: //subtract raw light level (simple fade) Level.Sectors[i].Lightlevel = BaseLightLevels[i] - FinalAdjustment; @@ -78,7 +78,9 @@ class DarkDoomZ_SectorLightAdjust : EventHandler { case 3: //clamp max brightness level Level.Sectors[i].Lightlevel = clamp(BaseLightLevels[i], 0, 256 - FinalAdjustment); break; - case 4: // + case 4: //apply exponential gamma curve + Level.Sectors[i].Lightlevel = (256 - (FinalAdjustment ** (FinalAdjustment / 256))) * (BaseLightLevels[i] / 256.0) ** (1 + (FinalAdjustment / 32)) ; + break; case 10: //DarkDoom Lite (fixed subtract mode) Level.Sectors[i].Lightlevel = BaseLightLevels[i] - 96; break;