Skip to content

Commit

Permalink
Merge pull request #2 from DGriffin91/revert-1-tonemap_options
Browse files Browse the repository at this point in the history
Revert "Tonemapping example refactor "
  • Loading branch information
DGriffin91 committed Feb 16, 2023
2 parents 2488305 + fd85e9d commit 291ce1f
Show file tree
Hide file tree
Showing 4 changed files with 361 additions and 298 deletions.
8 changes: 4 additions & 4 deletions crates/bevy_core_pipeline/src/tonemapping/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ pub struct TonemappingPipeline {
#[reflect(FromReflect)]
pub enum TonemappingMethod {
None,
/// Suffers from lots of hue shifting, brights don't desaturate naturally.
/// Suffers from lots hue shifting, brights don't desaturate naturally.
Reinhard,
/// Old bevy default. Suffers from hue shifting, brights don't desaturate much at all.
ReinhardLuminance,
/// Bad
ACES,
Aces,
/// Very Good
AgX,
/// Also good
Expand Down Expand Up @@ -123,7 +123,7 @@ impl SpecializedRenderPipeline for TonemappingPipeline {
TonemappingMethod::ReinhardLuminance => {
shader_defs.push("TONEMAP_METHOD_REINHARD_LUMINANCE".into());
}
TonemappingMethod::ACES => shader_defs.push("TONEMAP_METHOD_ACES".into()),
TonemappingMethod::Aces => shader_defs.push("TONEMAP_METHOD_ACES".into()),
TonemappingMethod::AgX => shader_defs.push("TONEMAP_METHOD_AGX".into()),
TonemappingMethod::SomewhatBoringDisplayTransform => {
shader_defs.push("TONEMAP_METHOD_SOMEWHAT_BORING_DISPLAY_TRANSFORM".into())
Expand Down Expand Up @@ -264,7 +264,7 @@ pub fn get_lut_bindings<'a>(
TonemappingMethod::None
| TonemappingMethod::Reinhard
| TonemappingMethod::ReinhardLuminance
| TonemappingMethod::ACES
| TonemappingMethod::Aces
| TonemappingMethod::AgX
| TonemappingMethod::SomewhatBoringDisplayTransform => &tonemapping_luts.agx,
TonemappingMethod::TonyMcMapface => &tonemapping_luts.tony_mc_mapface,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ pub fn queue_material_meshes<M: Material>(
TonemappingMethod::ReinhardLuminance => {
MeshPipelineKey::TONEMAP_METHOD_REINHARD_LUMINANCE
}
TonemappingMethod::ACES => MeshPipelineKey::TONEMAP_METHOD_ACES,
TonemappingMethod::Aces => MeshPipelineKey::TONEMAP_METHOD_ACES,
TonemappingMethod::AgX => MeshPipelineKey::TONEMAP_METHOD_AGX,
TonemappingMethod::SomewhatBoringDisplayTransform => {
MeshPipelineKey::TONEMAP_METHOD_SOMEWHAT_BORING_DISPLAY_TRANSFORM
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_sprite/src/mesh2d/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ pub fn queue_material2d_meshes<M: Material2d>(
TonemappingMethod::ReinhardLuminance => {
Mesh2dPipelineKey::TONEMAP_METHOD_REINHARD_LUMINANCE
}
TonemappingMethod::ACES => Mesh2dPipelineKey::TONEMAP_METHOD_ACES,
TonemappingMethod::Aces => Mesh2dPipelineKey::TONEMAP_METHOD_ACES,
TonemappingMethod::AgX => Mesh2dPipelineKey::TONEMAP_METHOD_AGX,
TonemappingMethod::SomewhatBoringDisplayTransform => {
Mesh2dPipelineKey::TONEMAP_METHOD_SOMEWHAT_BORING_DISPLAY_TRANSFORM
Expand Down
Loading

0 comments on commit 291ce1f

Please sign in to comment.