Skip to content

Commit

Permalink
Merge pull request #64 from zardoru/future
Browse files Browse the repository at this point in the history
Remove internal linear-to-gamma clamp (fixes glow effects)
  • Loading branch information
zardoru authored Sep 27, 2017
2 parents abd3041 + 9e57d6b commit 662dd11
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
21 changes: 16 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Test Screen",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceRoot}/msvc/Debug/raindrop.exe",
"args": ["-L", "screen_btest.lua"],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/debug",
"environment": [],
"externalConsole": false
},
{
"name": "(Windows) Attach",
"type": "cppvsdbg",
Expand All @@ -16,7 +27,7 @@
"stopAtEntry": false,
"cwd": "${workspaceRoot}/debug",
"environment": [],
"externalConsole": true
"externalConsole": false
},
{
"name": "(Windows) Run Test BMS file - Autoplay (debug/test.bms)",
Expand All @@ -27,7 +38,7 @@
"stopAtEntry": false,
"cwd": "${workspaceRoot}/debug",
"environment": [],
"externalConsole": true
"externalConsole": false
},
{
"name": "(Windows) Run Test BMS file (debug/test.bms)",
Expand All @@ -38,7 +49,7 @@
"stopAtEntry": false,
"cwd": "${workspaceRoot}/debug",
"environment": [],
"externalConsole": true
"externalConsole": false
},
{
"name": "(Windows) Run Tests",
Expand All @@ -49,7 +60,7 @@
"stopAtEntry": false,
"cwd": "${workspaceRoot}/debug",
"environment": [],
"externalConsole": true
"externalConsole": false
},
{
"name": "(Windows) Debug Launch",
Expand All @@ -60,7 +71,7 @@
"stopAtEntry": false,
"cwd": "${workspaceRoot}/debug",
"environment": [],
"externalConsole": true
"externalConsole": false
}
]
}
5 changes: 3 additions & 2 deletions src/Rendering.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ namespace Renderer {
}

inline float l2gamma (float c) {
if (c > 1.) return 1.;
/*if (c > 1.) return 1.;
else if (c < 0.) return 0.;
else if (c <= 0.04045) return c / 12.92;
else */
if (c <= 0.04045) return c / 12.92;
else return pow((c + 0.055) / 1.055, 2.4);
};

0 comments on commit 662dd11

Please sign in to comment.