@@ -97,19 +97,21 @@ ImageViewer::ImageViewer(
97
97
98
98
mImageCanvas = new ImageCanvas{horizontalScreenSplit, pixel_ratio ()};
99
99
100
- // Tonemapping sectionim
100
+ // DisplayMapping(PostProcessing) sectionim
101
101
{
102
102
auto panel = new Widget{mSidebarLayout };
103
103
panel->set_layout (new BoxLayout{Orientation::Horizontal, Alignment::Fill, 5 });
104
- new Label{panel, " Tonemapping " , " sans-bold" , 25 };
104
+ new Label{panel, " DisplayMapping " , " sans-bold" , 25 };
105
105
panel->set_tooltip (
106
- " Various tonemapping options. Hover the individual controls to learn more!"
106
+ " Various DisplayMapping options. Hover the individual controls to learn more!"
107
107
);
108
108
109
- // Exposure label and slider
109
+
110
+ // Exposure/Offset label and slider
110
111
{
111
112
panel = new Widget{mSidebarLayout };
112
- panel->set_layout (new BoxLayout{Orientation::Vertical, Alignment::Fill, 5 });
113
+ panel->set_layout (new GridLayout{ Orientation::Vertical, 2 , Alignment::Fill, 5 , 0 });
114
+
113
115
114
116
mExposureLabel = new Label{panel, " " , " sans-bold" , 15 };
115
117
@@ -124,12 +126,7 @@ ImageViewer::ImageViewer(
124
126
" Exposure scales the brightness of an image prior to tonemapping by 2^Exposure.\n\n "
125
127
" Keyboard shortcuts:\n E and Shift+E"
126
128
);
127
- }
128
129
129
- // Offset/Gamma label and slider
130
- {
131
- panel = new Widget{mSidebarLayout };
132
- panel->set_layout (new GridLayout{Orientation::Vertical, 2 , Alignment::Fill, 5 , 0 });
133
130
134
131
mOffsetLabel = new Label{panel, " " , " sans-bold" , 15 };
135
132
@@ -140,24 +137,18 @@ ImageViewer::ImageViewer(
140
137
});
141
138
setOffset (0 );
142
139
143
- mGammaLabel = new Label{panel, " " , " sans-bold" , 15 };
144
-
145
- mGammaSlider = new Slider{panel};
146
- mGammaSlider ->set_range ({0 .01f , 5 .0f });
147
- mGammaSlider ->set_callback ([this ](float value) {
148
- setGamma (value);
149
- });
150
- setGamma (2 .2f );
151
-
152
140
panel->set_tooltip (
153
141
" The offset is added to the image after exposure has been applied.\n "
154
142
" Keyboard shortcuts: O and Shift+O\n\n "
155
- " Gamma is the exponent used when gamma-tonemapping.\n "
156
- " Keyboard shortcuts: G and Shift+G\n\n "
157
143
);
158
144
}
159
145
}
160
146
147
+ // TODO: Tonemapping
148
+
149
+ // DOF(need a depth image)
150
+ // Bloom
151
+
161
152
// Exposure/offset buttons
162
153
{
163
154
auto buttonContainer = new Widget{mSidebarLayout };
@@ -176,6 +167,8 @@ ImageViewer::ImageViewer(
176
167
mCurrentImageButtons .push_back (
177
168
makeButton (" Normalize" , [this ]() { normalizeExposureAndOffset (); }, 0 , " Shortcut: N" )
178
169
);
170
+
171
+ // TODO: Split
179
172
makeButton (" Reset" , [this ]() { resetImage (); }, 0 , " Shortcut: R" );
180
173
181
174
if (mSupportsHdr ) {
@@ -232,7 +225,8 @@ ImageViewer::ImageViewer(
232
225
}
233
226
}
234
227
235
- // Tonemap options
228
+
229
+ // Display options
236
230
{
237
231
mTonemapButtonContainer = new Widget{mSidebarLayout };
238
232
mTonemapButtonContainer ->set_layout (new GridLayout{Orientation::Horizontal, 4 , Alignment::Fill, 5 , 2 });
@@ -245,22 +239,22 @@ ImageViewer::ImageViewer(
245
239
return button;
246
240
};
247
241
248
- makeTonemapButton (" sRGB" , [this ]() { setTonemap (ETonemap::SRGB); });
249
242
makeTonemapButton (" Gamma" , [this ]() { setTonemap (ETonemap::Gamma); });
243
+ makeTonemapButton (" sRGB" , [this ]() { setTonemap (ETonemap::SRGB); });
250
244
makeTonemapButton (" FC" , [this ]() { setTonemap (ETonemap::FalseColor); });
251
245
makeTonemapButton (" +/-" , [this ]() { setTonemap (ETonemap::PositiveNegative); });
252
246
253
- setTonemap (ETonemap::SRGB );
247
+ // setTonemap(ETonemap::Gamma );
254
248
255
249
mTonemapButtonContainer ->set_tooltip (
256
- " Tonemap operator selection:\n\n "
257
-
258
- " sRGB\n "
259
- " Linear to sRGB conversion\n\n "
250
+ " Display operator selection:\n\n "
260
251
261
252
" Gamma\n "
262
253
" Inverse power gamma correction\n\n "
263
254
255
+ " sRGB\n "
256
+ " Linear to sRGB conversion\n\n "
257
+
264
258
" FC\n "
265
259
" False-color visualization\n\n "
266
260
@@ -269,6 +263,29 @@ ImageViewer::ImageViewer(
269
263
);
270
264
}
271
265
266
+ // Gamma label and slider
267
+ {
268
+ auto panel = new Widget{ mSidebarLayout };
269
+ panel->set_layout (new BoxLayout{ Orientation::Vertical, Alignment::Fill, 5 });
270
+
271
+ mGammaLabel = new Label{ panel, " " , " sans-bold" , 15 };
272
+
273
+ mGammaSlider = new Slider{ panel };
274
+ mGammaSlider ->set_range ({ 0 .01f , 5 .0f });
275
+ mGammaSlider ->set_callback ([this ](float value) {
276
+ setGamma (value);
277
+ });
278
+
279
+ setGamma (2 .2f );
280
+ setTonemap (ETonemap::Gamma);
281
+
282
+ panel->set_tooltip (
283
+ " Gamma is the exponent used when gamma-tonemapping.\n "
284
+ " Keyboard shortcuts: G and Shift+G\n\n "
285
+ );
286
+ }
287
+
288
+
272
289
// Error metrics
273
290
{
274
291
mMetricButtonContainer = new Widget{mSidebarLayout };
0 commit comments