-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start Revive of Depth Prepass #5523
Start Revive of Depth Prepass #5523
Conversation
@@ -0,0 +1,104 @@ | |||
// NOTE: Keep in sync with pbr.wgsl | |||
[[block]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: update syntax
solved
Fixed with: pub fn queue_depth_prepass_meshes<M: Material>(
...
render_materials: Res<RenderMaterials<M>>,
) |
@@ -0,0 +1,786 @@ | |||
use crate::{ | |||
draw_3d_graph, AlphaMode, MeshPipeline, MeshUniform, StandardMaterial, MeshViewBindGroup, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made TransformBindGroup
, MeshViewBindGroup
because the transform no longer exists. I'm not yet sure if that was the right succession.
impl FromWorld for DepthPrepassPipeline { | ||
fn from_world(world: &mut World) -> Self { | ||
let render_device = world.get_resource::<RenderDevice>().unwrap(); | ||
let mesh_pipeline = world.get_resource::<MeshPipeline>().unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PbrPipeline
became MeshPipeline
I think.
ty: BindingType::Buffer { | ||
ty: BufferBindingType::Uniform, | ||
has_dynamic_offset: false, | ||
// TODO: change this to StandardMaterialUniformData::std140_size_static once crevice fixes this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bevy uses encase now. This probably can be updated.
} | ||
|
||
|
||
// TODO: ActiveCameras |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ActivesCameras are no longer a thing and the user is expected to track that themselves. I've subbed in "all 3d cameras" in the meantime.
The PR is almost compiling. Two major outstanding issues are accessing the active 3d camera ( |
@superdump said they're choosing to pursue a different approach, so closing this. |
reviving:
9262c8f
(#3072)temp link to original discord thread: https://discord.com/channels/691052431525675048/1002129015936655361/1002480744360317008
Objective
Adds a depth pre-pass so that custom materials can access the depth buffer data when implementing effects such as drawing the intersection of an opaque and an alpha-blended object on the alpha blended object.
Solution
Changelog
Migration Guide