-
I modifyed "post_process" example to 2d, and I had multiple cameras. When I add "PostProcessSettings" component to one of cameras, the effect will apply to the texture in other cameras of lower order. let mut camera_1: Camera2dBundle = Camera2dBundle::default();
camera_1.camera.order = 1;
commands.spawn((
camera_1,
RenderLayers::layer(1),
));
let mut camera_2: Camera2dBundle = Camera2dBundle::default();
camera_2.camera.order = 2;
commands.spawn((
camera_2,
RenderLayers::layer(2),
PostProcessSettings {
intensity: 0.01,
..default()
},
)); Any sprites in camara_1 will had postprocess effect, but if change camera_2's order to "0", effect in camera_2 only. This is test project. test_pp.zip |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I spent a couple days trying to figure out bevy's rendering. Eventually, I solved it. Just add a render node before But I still can't figure out the rest of the render graph. Why pass main_texture between cameras? Would it cause any trouble for each camera to do its own rendering and then write the texture to |
Beta Was this translation helpful? Give feedback.
I spent a couple days trying to figure out bevy's rendering. Eventually, I solved it. Just add a render node before
Node2d::MsaaWriteback
, clearview_target.main_texture_view()
in node.But I still can't figure out the rest of the render graph. Why pass main_texture between cameras? Would it cause any trouble for each camera to do its own rendering and then write the texture to
view_target.out_texture()
?