Skip to content

Commit

Permalink
Update cTonemap.fxh
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Jul 5, 2024
1 parent fca48de commit bf37479
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions shaders/shared/cTonemap.fxh
Original file line number Diff line number Diff line change
Expand Up @@ -136,27 +136,27 @@
ui_type = "combo";
ui_items = "None\0Reinhard\0Reinhard Squared\0Standard\0Exponential\0ACES Filmic Curve\0";
> = 5;
#endif

float3 ApplyTonemap(float3 HDR)
{
switch (_CShadeTonemapOperator)
float3 ApplyTonemap(float3 HDR)
{
case 0:
return HDR;
case 1:
return ApplyReinhardTonemap(HDR, 1.0);
case 2:
return ApplyReinhardSquaredTonemap(HDR, 0.25);
case 3:
return ApplyStandardTonemap(HDR);
case 4:
return ApplyExponentialTonemap(HDR);
case 5:
return ApplyToneMapACES(HDR);
default:
return HDR;
switch (_CShadeTonemapOperator)
{
case 0:
return HDR;
case 1:
return ApplyReinhardTonemap(HDR, 1.0);
case 2:
return ApplyReinhardSquaredTonemap(HDR, 0.25);
case 3:
return ApplyStandardTonemap(HDR);
case 4:
return ApplyExponentialTonemap(HDR);
case 5:
return ApplyToneMapACES(HDR);
default:
return HDR;
}
}
}
#endif

#endif

0 comments on commit bf37479

Please sign in to comment.