Skip to content

Commit 846a871

Browse files
authored
Export tonemapping_pipeline_key (2d), alpha_mode_pipeline_key (#11166)
This expands upon #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.
1 parent 443b64a commit 846a871

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/bevy_pbr/src/material.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ impl<P: PhaseItem, M: Material, const I: usize> RenderCommand<P> for SetMaterial
404404

405405
pub type RenderMaterialInstances<M> = ExtractedInstances<AssetId<M>>;
406406

407-
const fn alpha_mode_pipeline_key(alpha_mode: AlphaMode) -> MeshPipelineKey {
407+
pub const fn alpha_mode_pipeline_key(alpha_mode: AlphaMode) -> MeshPipelineKey {
408408
match alpha_mode {
409409
// Premultiplied and Add share the same pipeline key
410410
// They're made distinct in the PBR shader, via `premultiply_alpha()`

crates/bevy_sprite/src/mesh2d/material.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl<P: PhaseItem, M: Material2d, const I: usize> RenderCommand<P>
354354
}
355355
}
356356

357-
const fn tonemapping_pipeline_key(tonemapping: Tonemapping) -> Mesh2dPipelineKey {
357+
pub const fn tonemapping_pipeline_key(tonemapping: Tonemapping) -> Mesh2dPipelineKey {
358358
match tonemapping {
359359
Tonemapping::None => Mesh2dPipelineKey::TONEMAP_METHOD_NONE,
360360
Tonemapping::Reinhard => Mesh2dPipelineKey::TONEMAP_METHOD_REINHARD,

0 commit comments

Comments
 (0)