update overlay to have ps controls too
[carveJwlIkooP6JGAAIwe30JlM.git] / depth_compare.h
1 #pragma once
2 #include "vg/vg_m.h"
3 #include "skaterift.h"
4 #include "render.h"
5
6 static inline void depth_compare_bind(
7 void (*uTexSceneDepth)(int),
8 void (*uInverseRatioDepth)(v3f),
9 void (*uInverseRatioMain)(v3f),
10 vg_camera *cam )
11 {
12 uTexSceneDepth( 5 );
13 render_fb_bind_texture( gpipeline.fb_main, 2, 5 );
14 v3f inverse;
15 render_fb_inverse_ratio( gpipeline.fb_main, inverse );
16 inverse[2] = skaterift.cam.farz-skaterift.cam.nearz;
17
18 uInverseRatioDepth( inverse );
19 render_fb_inverse_ratio( NULL, inverse );
20 inverse[2] = cam->farz-cam->nearz;
21 uInverseRatioMain( inverse );
22 }