Skip to content

Commit f1d90be

Browse files
Switch outputs_srgb default value to true
1 parent b95779d commit f1d90be

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ macro_rules! program {
616616
let __tessellation_evaluation_shader: Option<&str> = None;
617617
let __geometry_shader: Option<&str> = None;
618618
let __fragment_shader: &str = "";
619-
let __outputs_srgb: bool = false;
619+
let __outputs_srgb: bool = true;
620620
let __uses_point_size: bool = false;
621621

622622
$(

src/program/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ pub enum ProgramCreationInput<'a> {
262262
/// `None`, then you won't be able to use transform feedback.
263263
transform_feedback_varyings: Option<(Vec<String>, TransformFeedbackMode)>,
264264

265-
/// Whether the fragment shader outputs colors in `sRGB` or `RGB`. This is false by default,
266-
/// meaning that the program outputs `RGB`.
265+
/// Whether the fragment shader outputs colors in `sRGB` or `RGB`. This is true by default,
266+
/// meaning that the program is responsible for outputting correct `sRGB` values.
267267
///
268268
/// If this is false, then `GL_FRAMEBUFFER_SRGB` will be enabled when this program is used
269269
/// (if it is supported).
@@ -333,7 +333,7 @@ impl<'a> SpirvProgram<'a> {
333333
tessellation_evaluation_shader: None,
334334
geometry_shader: None,
335335
transform_feedback_varyings: None,
336-
outputs_srgb: false,
336+
outputs_srgb: true,
337337
uses_point_size: false,
338338
}
339339
}
@@ -416,7 +416,7 @@ impl<'a> From<SourceCode<'a>> for ProgramCreationInput<'a> {
416416
geometry_shader,
417417
fragment_shader,
418418
transform_feedback_varyings: None,
419-
outputs_srgb: false,
419+
outputs_srgb: true,
420420
uses_point_size: false,
421421
}
422422
}
@@ -436,7 +436,7 @@ impl<'a> From<Binary> for ProgramCreationInput<'a> {
436436
fn from(binary: Binary) -> ProgramCreationInput<'a> {
437437
ProgramCreationInput::Binary {
438438
data: binary,
439-
outputs_srgb: false,
439+
outputs_srgb: true,
440440
uses_point_size: false,
441441
}
442442
}

src/program/program.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl Program {
207207
tessellation_control_shader: None,
208208
tessellation_evaluation_shader: None,
209209
transform_feedback_varyings: None,
210-
outputs_srgb: false,
210+
outputs_srgb: true,
211211
uses_point_size: false,
212212
})
213213
}

0 commit comments

Comments
 (0)