Skip to content

Commit

Permalink
changing the smoothing formula to one TJWhale suggested (Revolutionar…
Browse files Browse the repository at this point in the history
…y-Games#753)

* changing the smoothing formula to one TJWhale suggested

* f
  • Loading branch information
crodnu authored and hhyyrylainen committed Mar 15, 2019
1 parent 57043ad commit dbe8f3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/microbe_stage/compound_cloud_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ void
// TODO: move this to the shaders for better performance (we would
// need to pass a float instead of a byte).
int intensity =
static_cast<int>(255 * std::log(density[i][j] / 1000 + 1));
static_cast<int>(255 * 2 * std::atan(0.003f * density[i][j]));

// This is the same clamping code as in the old version
intensity = std::clamp(intensity, 0, 255);
Expand Down

0 comments on commit dbe8f3d

Please sign in to comment.