diff options
author | quou <quou@disroot.org> | 2024-12-29 14:49:07 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-12-29 14:49:07 +1100 |
commit | 96c459ca2f52cf2c5bec269d0f30e01d21bc916b (patch) | |
tree | 7e98cb0b36f77eabb55b1b96f66225eb13ca351d /c2.cpp | |
parent | 09d6ea353e1ed9502967c1406061613272eafb63 (diff) |
add depth prepass
Diffstat (limited to 'c2.cpp')
-rw-r--r-- | c2.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -189,6 +189,10 @@ extern "C" int entrypoint() { dev->get_ctx().submit(pb.build_rp()); pb.begin_rp(); + pb.rp_depth_target(dev->get_depth_target(), Clear_Mode::restore); + Render_Pass& depth_prepass = pb.build_rp(); + + pb.begin_rp(); pb.rp_target(dev->get_backbuffer(), Clear_Mode::restore); pb.rp_depth_target(dev->get_depth_target(), Clear_Mode::restore); Render_Pass& pass2 = pb.build_rp(); @@ -212,6 +216,13 @@ extern "C" int entrypoint() { monkey->render( dev, &frame_arena, + depth_prepass, + transform, + projection + ); + monkey->render( + dev, + &frame_arena, pass2, transform, projection |