mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 06:00:20 +00:00
Export tonemapping_pipeline_key (2d), alpha_mode_pipeline_key (#11166)
This expands upon https://github.com/bevyengine/bevy/pull/11134. I found myself needing `tonemapping_pipeline_key` for some custom 2d draw functions. #11134 exported the 3d version of `tonemapping_pipeline_key` and this PR exports the 2d version. I also made `alpha_mode_pipeline_key` public for good measure.
This commit is contained in:
parent
443b64a612
commit
846a871cb2
2 changed files with 2 additions and 2 deletions
|
@ -404,7 +404,7 @@ impl<P: PhaseItem, M: Material, const I: usize> RenderCommand<P> for SetMaterial
|
|||
|
||||
pub type RenderMaterialInstances<M> = ExtractedInstances<AssetId<M>>;
|
||||
|
||||
const fn alpha_mode_pipeline_key(alpha_mode: AlphaMode) -> MeshPipelineKey {
|
||||
pub const fn alpha_mode_pipeline_key(alpha_mode: AlphaMode) -> MeshPipelineKey {
|
||||
match alpha_mode {
|
||||
// Premultiplied and Add share the same pipeline key
|
||||
// They're made distinct in the PBR shader, via `premultiply_alpha()`
|
||||
|
|
|
@ -354,7 +354,7 @@ impl<P: PhaseItem, M: Material2d, const I: usize> RenderCommand<P>
|
|||
}
|
||||
}
|
||||
|
||||
const fn tonemapping_pipeline_key(tonemapping: Tonemapping) -> Mesh2dPipelineKey {
|
||||
pub const fn tonemapping_pipeline_key(tonemapping: Tonemapping) -> Mesh2dPipelineKey {
|
||||
match tonemapping {
|
||||
Tonemapping::None => Mesh2dPipelineKey::TONEMAP_METHOD_NONE,
|
||||
Tonemapping::Reinhard => Mesh2dPipelineKey::TONEMAP_METHOD_REINHARD,
|
||||
|
|
Loading…
Reference in a new issue