Skip to content

Commit

Permalink
Adjust "crush" curve again.
Browse files Browse the repository at this point in the history
  • Loading branch information
caligari87 committed Mar 31, 2019
1 parent b1c0f50 commit dafd84d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zscript.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -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/n1lvnyceve
// https://www.desmos.com/calculator/v1ni4wftcg
switch(Mode) {
case 1: //subtract raw light level (simple fade)
Level.Sectors[i].Lightlevel = BaseLightLevels[i] - FinalAdjustment;
Expand All @@ -79,7 +79,7 @@ class DarkDoomZ_SectorLightAdjust : EventHandler {
Level.Sectors[i].Lightlevel = clamp(BaseLightLevels[i], 0, 256 - FinalAdjustment);
break;
case 4: //apply exponential gamma curve
Level.Sectors[i].Lightlevel = (256 - (FinalAdjustment ** (FinalAdjustment / 256))) * (BaseLightLevels[i] / 256.0) ** (1 + (FinalAdjustment / 32)) ;
Level.Sectors[i].Lightlevel = (256 - (FinalAdjustment ** (FinalAdjustment / 256))) * (BaseLightLevels[i] / 256.0) ** (1 + (FinalAdjustment / (33 - (FinalAdjustment / 8))));
break;
case 10: //DarkDoom Lite (fixed subtract mode)
Level.Sectors[i].Lightlevel = BaseLightLevels[i] - 96;
Expand Down

0 comments on commit dafd84d

Please sign in to comment.