Skip to content

Commit

Permalink
prefer customised parameters: do_pass_scenedepth
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoyvwac committed Dec 28, 2022
1 parent c93f7ed commit cad0640
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sandbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1756,10 +1756,10 @@ void do_pass_scenebuffer(const std::string& prompt_id, const BuffersList& fbolis
for(const auto& fbo : fbolist) { print_fbo_text(*fbo, prompt_id, uio); }
}

void do_pass_scenedepth(const std::string& prompt_id, Uniforms& uniforms, const render_pass_args_t& current, render_ui_t& uio) {
void do_pass_scenedepth(const std::string& prompt_id, Uniforms& uniforms, const vera::Fbo& fbo, render_ui_t& uio) {
if (!uniforms.functions[prompt_id].present) { return; }
if (uniforms.activeCamera)
vera::imageDepth(*current.fbo, uio.offset.x, uio.offset.y, uio.step.x, uio.step.y, uniforms.activeCamera->getFarClip(), uniforms.activeCamera->getNearClip());
vera::imageDepth(fbo, uio.offset.x, uio.offset.y, uio.step.x, uio.step.y, uniforms.activeCamera->getFarClip(), uniforms.activeCamera->getNearClip());
print_text(prompt_id, uio.offset.x - uio.step.x, uio);
}

Expand Down Expand Up @@ -1826,7 +1826,7 @@ void process_render_passes(Uniforms& uniforms, const SceneRender& m_sceneRender,
do_pass_scene("u_sceneNormal", uniforms, m_sceneRender.normalFbo, uio);
do_pass_scenebuffer("u_sceneBuffer", m_sceneRender.buffersFbo, uio);
do_pass_scene("u_scene", uniforms, m_sceneRender.renderFbo, uio);
do_pass_scenedepth("u_sceneDepth", uniforms, {&m_sceneRender.renderFbo, nullptr}, uio);
do_pass_scenedepth("u_sceneDepth", uniforms, m_sceneRender.renderFbo, uio);
}

namespace overlay_actions {
Expand Down

0 comments on commit cad0640

Please sign in to comment.