You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on converting my shaders from wgsl to rust-gpu, it's all perfect except I got depth compiling with this. The issue is that it simply isn't writing to the depth when I preview that on bevy, the pipeline on the bevy side is identical to what I had with wgsl before.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I've been working on converting my shaders from wgsl to rust-gpu, it's all perfect except I got depth compiling with this. The issue is that it simply isn't writing to the depth when I preview that on bevy, the pipeline on the bevy side is identical to what I had with wgsl before.
#[spirv(fragment(depth_replacing))]
fn main_fs(
#[spirv(location = 0)] uv: Vec2,
#[spirv(uniform, descriptor_set = 0, binding = 0)] view: &ViewUniform,
#[spirv(descriptor_set = 0, binding = 2)] base_texture: &Image!(3D, type=f32, sampled=true),
#[spirv(descriptor_set = 0, binding = 3)] details_texture: &Image!(3D, type=f32, sampled=true),
#[spirv(descriptor_set = 0, binding = 4)] weather_texture: &Image!(2D, type=f32, sampled=true),
#[spirv(descriptor_set = 0, binding = 1)] sampler: &Sampler,
#[spirv(location = 0)] out_color: &mut Vec4,
#[spirv(location = 1)] out_motion: &mut Vec4,
#[spirv(frag_depth)] out_frag_depth: &mut f32,
) {
This is the wgsl I had before:
struct FragmentOutput {
@location(0) color: vec4,
@location(1) motion: vec4,
@Builtin(frag_depth) frag_depth: f32,
};
@Fragment
fn main(in: FullscreenVertexOutput) -> FragmentOutput {
Beta Was this translation helpful? Give feedback.
All reactions