summaryrefslogtreecommitdiff
path: root/src/effects/particles_effect_v2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/particles_effect_v2.cc')
-rw-r--r--src/effects/particles_effect_v2.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/effects/particles_effect_v2.cc b/src/effects/particles_effect_v2.cc
index 5a1a07c..69da4da 100644
--- a/src/effects/particles_effect_v2.cc
+++ b/src/effects/particles_effect_v2.cc
@@ -53,8 +53,8 @@ ParticlesEffectV2::ParticlesEffectV2(const GpuContext& ctx,
ResourceBinding render_bindings[] = {
{particles_buffer_, WGPUBufferBindingType_ReadOnlyStorage},
{uniforms_.get(), WGPUBufferBindingType_Uniform}};
- render_pass_ = gpu_create_render_pass(ctx_.device, ctx_.format, particle_render_v2_wgsl,
- render_bindings, 2);
+ render_pass_ = gpu_create_render_pass(ctx_.device, WGPUTextureFormat_RGBA8Unorm,
+ particle_render_v2_wgsl, render_bindings, 2);
render_pass_.vertex_count = 6;
render_pass_.instance_count = NUM_PARTICLES;
}
@@ -77,7 +77,9 @@ void ParticlesEffectV2::render(WGPUCommandEncoder encoder,
WGPURenderPassColorAttachment color_attachment = {
.view = output_view,
+#if !defined(DEMO_CROSS_COMPILE_WIN32)
.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED,
+#endif
.loadOp = WGPULoadOp_Clear,
.storeOp = WGPUStoreOp_Store,
.clearValue = {0.0, 0.0, 0.0, 1.0}};