glider stuff
[carveJwlIkooP6JGAAIwe30JlM.git] / depth_compare.h
1 #ifndef DEPTH_COMPARE_H
2 #define DEPTH_COMPARE_H
3
4 #include "vg/vg_m.h"
5 #include "render.h"
6
7 static void depth_compare_bind(
8 void (*uTexSceneDepth)(int),
9 void (*uInverseRatioDepth)(v3f),
10 void (*uInverseRatioMain)(v3f),
11 camera *cam ){
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 }
23
24 #endif /* DEPTH_COMPARE_H */