Skip to content

Commit

Permalink
Added "none" option to tonemap
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Jun 29, 2024
1 parent dad90be commit 06268bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion shaders/kContour.fx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
uniform int _Method <
ui_label = "Edge Detection Method";
ui_type = "combo";
ui_items = " ddx(), ddy()\0 Bilinear 3x3 Sobel\0 Bilinear 5x5 Prewitt\0 Bilinear 5x5 Sobel\0 3x3 Prewitt\0 3x3 Scharr\0";
ui_items = "ddx(), ddy()\0Bilinear 3x3 Sobel\0Bilinear 5x5 Prewitt\0Bilinear 5x5 Sobel\03x3 Prewitt\03x3 Scharr\0";
> = 0;

uniform float _Threshold <
Expand Down
8 changes: 5 additions & 3 deletions shaders/shared/cTonemap.fxh
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,20 @@
ui_label = "Tonemap Operator";
ui_tooltip = "Select a tonemap operator for the output";
ui_type = "combo";
ui_items = "Reinhard\0DirectX Graphics Tonemap\0ACES Filmic Approximation\0";
ui_items = "None\0Reinhard\0DirectX Graphics Tonemap\0ACES Filmic Approximation\0";
> = 1;

float3 ApplyTonemap(float3 HDR)
{
switch (_CShadeTonemapOperator)
{
case 0:
return ApplyReinhardTonemap(HDR, 1.0);
return HDR;
case 1:
return ApplyNewToneMap(HDR);
return ApplyReinhardTonemap(HDR, 1.0);
case 2:
return ApplyNewToneMap(HDR);
case 3:
return ApplyToneMapACES(HDR);
default:
return HDR;
Expand Down

0 comments on commit 06268bb

Please sign in to comment.