Skip to content

Commit

Permalink
fix transmission
Browse files Browse the repository at this point in the history
  • Loading branch information
Elabajaba committed Dec 6, 2023
1 parent 7068c30 commit f33f989
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use bevy_render::{
render_graph::{NodeRunError, RenderGraphContext, ViewNode},
render_phase::RenderPhase,
render_resource::{
Extent3d, LoadOp, Operations, RenderPassDepthStencilAttachment, RenderPassDescriptor,
Extent3d, LoadOp, Operations, RenderPassDepthStencilAttachment, RenderPassDescriptor, StoreOp,
},
renderer::RenderContext,
view::{ViewDepthTexture, ViewTarget},
Expand Down Expand Up @@ -47,17 +47,19 @@ impl ViewNode for MainTransmissivePass3dNode {
// NOTE: The transmissive pass loads the color buffer as well as overwriting it where appropriate.
color_attachments: &[Some(target.get_color_attachment(Operations {
load: LoadOp::Load,
store: true,
store: StoreOp::Store,
}))],
depth_stencil_attachment: Some(RenderPassDepthStencilAttachment {
view: &depth.view,
// NOTE: The transmissive main pass loads the depth buffer and possibly overwrites it
depth_ops: Some(Operations {
load: LoadOp::Load,
store: true,
store: StoreOp::Store,
}),
stencil_ops: None,
}),
timestamp_writes: None,
occlusion_query_set: None,
};

// Run the transmissive pass, sorted back-to-front
Expand Down

0 comments on commit f33f989

Please sign in to comment.