Skip to content

Commit 82e9981

Browse files
style: 🎨 apply pre-commit.ci formatting
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
1 parent d6d24b7 commit 82e9981

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

package/Shaders/Common/Open_DRT.hlsl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ float3 open_drt_transform(
210210
0.00f // -0.5f
211211
);
212212

213-
/* Tonescale Parameters
213+
/* Tonescale Parameters
214214
----------------------
215215
For the tonescale compression function, we use one inspired by the wisdom shared by Daniele Siragusano
216216
on the tonescale thread on acescentral: https://community.acescentral.com/t/output-transform-tone-scale/3498/224
@@ -224,15 +224,15 @@ float3 open_drt_transform(
224224
225225
For the user parameter space, we include the following creative controls:
226226
- Lp: display peak luminance. This sets the display device peak luminance and allows rendering for HDR.
227-
- contrast: This is a pivoted power function applied after the hyperbolic compress function,
227+
- contrast: This is a pivoted power function applied after the hyperbolic compress function,
228228
which keeps middle grey and peak white the same but increases contrast in between.
229-
- flare: Applies a parabolic toe compression function after the hyperbolic compression function.
229+
- flare: Applies a parabolic toe compression function after the hyperbolic compression function.
230230
This compresses values near zero without clipping. Used for flare or glare compensation.
231231
- gb: Grey Boost. This parameter controls how many stops to boost middle grey per stop of peak luminance increase.
232232
233233
Notes on the other non user-facing parameters:
234234
- (px, py): This is the peak luminance intersection constraint for the compression function.
235-
px is the input scene-linear x-intersection constraint. That is, the scene-linear input value
235+
px is the input scene-linear x-intersection constraint. That is, the scene-linear input value
236236
which is mapped to py through the compression function. By default this is set to 128 at Lp=100, and 256 at Lp=1000.
237237
Here is the regression calculation using a logarithmic function to match: https://www.desmos.com/calculator/chdqwettsj
238238
- (gx, gy): This is the middle grey intersection constraint for the compression function.
@@ -304,7 +304,7 @@ float3 open_drt_transform(
304304
Most of our data is now inside of the display gamut cube, but there may still be some gradient disruptions
305305
due to highly chromatic colors going outside of the display cube on the lower end and then being clipped
306306
whether implicitly or explicitly. To combat this, our last step is to do a soft clip or gamut compression.
307-
In RGB Ratios, 0,0,0 is the gamut boundary, and anything outside of gamut will have one or more negative
307+
In RGB Ratios, 0,0,0 is the gamut boundary, and anything outside of gamut will have one or more negative
308308
components. So to compress the gamut we use lift these negative values and compress them into a small range
309309
near 0. We use the "PowerP" hyperbolic compression function but it could just as well be anything.
310310
*/
@@ -330,7 +330,7 @@ float3 open_drt_transform(
330330
Here we split apart the calculation for hue and chroma so that we have access to RGB CMY
331331
individually without having to linear step extract the result again.
332332
333-
To do this, we first calculate the "wide" hue angle:
333+
To do this, we first calculate the "wide" hue angle:
334334
wide hue RGB = (RGB - mn)/mx
335335
wide hue CMY = (mx - RGB)/mx
336336
and then "narrow down" the hue angle for each with channel subtraction (see narrow_hue_angles() function).
@@ -405,7 +405,7 @@ float3 open_drt_transform(
405405
Since we compress chroma by lerping in a straight line towards 1.0 in rgb ratios, this can result in perceptual hue shifts
406406
due to the Abney effect. For example, pure blue compressed in a straight line towards achromatic appears to shift in hue towards purple.
407407
408-
To combat this, and to add another important user control for image appearance, we add controls to curve the hue paths
408+
To combat this, and to add another important user control for image appearance, we add controls to curve the hue paths
409409
as they move towards achromatic. We include only controls for primary colors: RGB. In my testing, it was of limited use to
410410
control hue paths for CMY.
411411
@@ -431,9 +431,9 @@ float3 open_drt_transform(
431431
In order to improve skin-tone rendering and overal "vibrance" of the image, which we
432432
are used to seeing with per-channel style view transforms, we boost mid-range chroma
433433
in shadows and midtones using a "chroma contrast" setup.
434-
435-
Basically we take classical chroma (distance from achromatic), we take the compressed tonescale curve,
436-
and we apply a contrast to the tonescale curve mixed by a parabolic center extraction of chroma,
434+
435+
Basically we take classical chroma (distance from achromatic), we take the compressed tonescale curve,
436+
and we apply a contrast to the tonescale curve mixed by a parabolic center extraction of chroma,
437437
so that we do not boost saturation at grey (increases noise), nor do we boost saturation of highly
438438
saturated colors which might already be near the edge of the gamut volume.
439439
*/

src/Menu.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,8 +1599,7 @@ void Menu::DrawDisplaySettings()
15991599

16001600
const std::vector<std::pair<std::string, std::function<void()>>> features = {
16011601
{ "Upscaling", []() { globals::upscaling->DrawSettings(); } },
1602-
{ "Performance Overlay", [this]() { DrawPerformanceOverlaySettings(); } }
1603-
{ "High Dynamic Range", []() { globals::hdr->DrawSettings(); } }
1602+
{ "Performance Overlay", [this]() { DrawPerformanceOverlaySettings(); } } { "High Dynamic Range", []() { globals::hdr->DrawSettings(); } }
16041603
};
16051604

16061605
for (const auto& [featureName, drawFunc] : features) {

0 commit comments

Comments
 (0)